Hi
Why to recalculate row 10 along with every row?
....
Sheets("FTSE").Select
If Range("Z10")<>"" Then
Range("Y10").GoalSeek Goal:=Range("Z10").Value,
ChangingCell:=Range("X10")
Else
Range("Y10").GoalSeek Goal:=706, ChangingCell:=Range("X10")
End If
For i=11 To 500
If Range("z" & i) <> "" Then
Range("Y" & i).GoalSeek Goal:=Range("Z" & i).Value,
ChangingCell:=Range("X" & i)
End If
Next i
....
Arvi Laanemets
<daniroy@gmail.com> wrote in message
news:1122906082.960281.196530@z14g2000cwz.googlegroups.com...
> thanks a lot everybody, I appreciate your help and I may need you again
> in a close future.
> The real problem was that the goalseek was unable to run because the
> very first row did not have any data to reach for. Thus I did add a
> rule to check if first row must be taken into consideration or not.
>
> Here is the final code. Thank you again everybody.
>
>
> Sheets("FTSE").Select
>
> For i = 10 To 500
>
> If Range("z" & i) <> "" Then
>
>
> Range("Y" & i).GoalSeek Goal:=Range("Z" & i).Value,
> ChangingCell:=Range("X" & i)
> Range("Y10").GoalSeek Goal:=706, ChangingCell:=Range("X10")
> End If
>
> Next i
>
>
> End Sub
>
Bookmarks