John Davis
Well-known Member
- Joined
- Sep 11, 2007
- Messages
- 3,457
Hello all:
I have the following, which does absolutely nothing, although the If/And statements are True.
Perhaps someone can see something I missed or not understanding.
I have the following, which does absolutely nothing, although the If/And statements are True.
Code:
Sub test()
Dim i As Long
Dim lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
For i = lr To 2 Step -1
If Range("C" & i).Value = "Yes" And Range("A" & i).Value = Range("D1").Value And Range("A" & i).Value = Range("A" & i).Offset(1, 0).Value Then
Range("A" & i).select
MsgBox ("Value found at Row " & ActiveCell.Row & "! Stop")
End If
Next
End Sub
Perhaps someone can see something I missed or not understanding.