John Davis
Well-known Member
- Joined
- Sep 11, 2007
- Messages
- 3,457
Hello All:
I have the following:
It does nothing. What am I missing? Any advice is appreciated.
I have the following:
Code:
Sub GOALSEEK()
'
' GOALSEEK Macro
'
Dim i As Long
Dim x As Long
Dim lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lr Step -1
x = Range("Q" & i).Value
If Range("I" & i) = Range("I" & i).Offset(1, 0) And x < 0.05 And Range("Q" & i).Offset(1, 0).Value > 0.1 And Range("S" & i).Value = "3701.30.0000" Then
Range("Q" & i).GOALSEEK Goal:=x, ChangingCell:=Range("L" & i).Value
End If
Next i
End Sub
It does nothing. What am I missing? Any advice is appreciated.