I am trying to automate the Goalseek function.
Sub Goalseek()
Dim rw As Integer
Dim cl As Integer
Set rw = ActiveCell.Row
cl = ActiveCell.Column
To_value = Cells(rw, cl - 25).Value
Cells(rw, cl + 6).Goalseek Goal:=To_value, ChangingCell:=Cells(rw, cl)
End Sub
And the
Compile error: Object Required
shows up.