help with goal seek

  • Thread starter Thread starter Stephan
  • Start date Start date
S

Stephan

Hi all,
I have been using goal seek to solve for the input value to my equation.
my problem is that I have 100 instances to solve.

column B are the desired values,
column C are the input values.
column D is the result of my calculation applied to the column C values
column E is the difference between B and D.

I've thought I could use a macro to do this,
but it looks to me like macros only accept absolute references.
can anyone help me on how to understand this?

so as not to seem lazy, I have already searched for
an answer to this without success. Maybe I am not using the
correct terminology.

Years ago, when I was using quatro pro, one could put a macro
into a cell and use relative cell assignments for inputs, etc.
then copy the macro cell across and solve multiple input values
quite easily.

Thanks in advance for any help..
Stephan
 
Hi Stephan,

' ===========
Sub Macro1()
Dim i As Long
For i = 1 To 100
Range("D" & i).GoalSeek Goal:=Range("B" & i), ChangingCell:=Range("C" &
i)
Next i
End Sub
' ===========
 
Hello Niek,

I am very new at macros, so I didn't
understand your answer at first.
a nice basic tutorial later, and all is resolved.

Thank you so much for your guidance!

Stephan
 
Back
Top