Hi
....
For i=10 To 500
Range("y" & i).GoalSeek Goal:=ActiveSheet.Range("z" & i).Value,
ChangingCell:=Sheets("FTSE").Range("x" & i)
Next For
....
--
Arvi Laanemets
( My real mail address: arvil<at>tarkon.ee )
<daniroy@gmail.com> wrote in message
news:1122882955.038904.117170@g47g2000cwa.googlegroups.com...
> Hi there
>
> I have to create 500 lines of almost identical VBA code. Code is
>
> Range("y10").GoalSeek Goal:=ActiveSheet.Range("z10").Value,
> ChangingCell:=Sheets("FTSE").Range("x10")
> Range("y11").GoalSeek Goal:=ActiveSheet.Range("z11").Value,
> ChangingCell:=Sheets("FTSE").Range("x11")
> Range("y12").GoalSeek Goal:=ActiveSheet.Range("z12").Value,
> ChangingCell:=Sheets("FTSE").Range("x12")
>
> and so on untill
>
> Range("y500").GoalSeek Goal:=ActiveSheet.Range("z500").Value,
> ChangingCell:=Sheets("FTSE").Range("x500")
>
> What is the most logical way to proceed, please ?
>
> All the best
> Daniel
>
Bookmarks