A
al
Sub Goalseek()
'
Range("Y84").Goalseek Goal:=Range("AL84"), ChangingCell:=Range("Y50")
Range("Y85").Select
Range("Y85").Goalseek Goal:=Range("AL85"), ChangingCell:=Range("Y51")
Range("Y86").Select
Range("Y86").Goalseek Goal:=Range("AL86"), ChangingCell:=Range("Y52")
End Sub
In above macro column Y can vary - i.e it E to X.
I therefore would like to have the column matched against
corresponding Numbers
e.g 1 would be equivalent to column E, 2 would be equivalent to column
F & so on.
I have cell AL83 which gives the required column "number"
How can i amend the above macro to link it with the value in cell AL83
& proceed with the goal seek
Thxs
'
Range("Y84").Goalseek Goal:=Range("AL84"), ChangingCell:=Range("Y50")
Range("Y85").Select
Range("Y85").Goalseek Goal:=Range("AL85"), ChangingCell:=Range("Y51")
Range("Y86").Select
Range("Y86").Goalseek Goal:=Range("AL86"), ChangingCell:=Range("Y52")
End Sub
In above macro column Y can vary - i.e it E to X.
I therefore would like to have the column matched against
corresponding Numbers
e.g 1 would be equivalent to column E, 2 would be equivalent to column
F & so on.
I have cell AL83 which gives the required column "number"
How can i amend the above macro to link it with the value in cell AL83
& proceed with the goal seek
Thxs