Nicobisgaard60
New Member
- Joined
- Sep 4, 2016
- Messages
- 14
I have searched extensively for the above, but i cannot find a solution that is iterative and that satisfies the conditions.
I have a value, x, in cell A1 and a value, y, in cell A2.
Then i have a value, k1, in cell A3, and a value, k2 in cell A4.
I want to change the value of x and y, to achieve a value of 0 of value k1 and k2.
So essentially i have two equations with two unknowns that are too complicated to be solved. Therefor i want to use goalseek, the values of cell A1 and cell A2 untill cell A3 and A4 is equal to 0.
Current macro reads:
Problem is that it first finds a value for A1 so cell A3 is equal to 0. Then it finds a value of A2 so cell A4 is equal to 0. But since they are dependant values, cell A3 is now not 0 anymore.
Is it possible to create a double seek function that can handle two dependant input values?
I have a value, x, in cell A1 and a value, y, in cell A2.
Then i have a value, k1, in cell A3, and a value, k2 in cell A4.
I want to change the value of x and y, to achieve a value of 0 of value k1 and k2.
So essentially i have two equations with two unknowns that are too complicated to be solved. Therefor i want to use goalseek, the values of cell A1 and cell A2 untill cell A3 and A4 is equal to 0.
Current macro reads:
Code:
Sub Macro1()'For i = 1 To 500
For j = 16 To 17
k = j + 3
Cells(k, "B").GoalSeek Goal:=0, ChangingCell:=Cells(j, "B")
Next j
'Next i
End Sub
Is it possible to create a double seek function that can handle two dependant input values?