I'm trying to use a macro to produce a value in a column of cells, based on 2 other cells in the same row. I'm obviously missing something as I keep getting a 1004 error "reference not valid."
Code:
Can any one point out what the issue causing this mihgt be?
Many thanks.
Code:
Code:
Sub Macro1()
Dim i As Integer
For i = 2 To 23
Cells(i, 18).GoalSeek Goal:=Cells(i, 2).Value, ChangingCell:=Cells(i, 16)
Next i
End Sub
Many thanks.