Is there a function to keep a cell locked at a certain value regardless of one of the input variables changing?

Hello! I'm new to the forum and am working on my excel skills.

I am curious how to lock one "output" cell at a specific value, regardless of whether one of the input variables changes. For this, I realize that at least ONE of the input variables will need to change in order for this to happen, which is fine. Basically, I'm looking for a formula that will automatically "goal seek" and insert the necessary input value in order to keep the output cell at a certain value. So, I change one input variable, excel changes another input variable, and the output variable always stays the same.

Here's a simplistic example that I think captures what I want to do on a more complex level.

Cell 1: 5
Cell 2: 10
Cell 3: Cell 1 + Cell 2 = 15

I want a formula in Cell 3 that keeps Cell 3 at the value 15 by changing Cell 1. I will change Cell 2 using various scenarios, but I want to always make sure that Cell 3 stays at 15 no matter what I do.

I hope that makes sense. I'm doing something more complicated, but I tried to simplify the example. Can anyone help? Thanks!!