JimS
06-21-2012, 07:06 AM
Trying to get an IF statement to test for 2 different condition using an OR function.
Basically delete the row if the contents of the cell does not contain "test1" or "test2" in my example below.
I loop through the rows using x (looping code is not included below).
Thanks for any quick help...
JimS
If Cells(x, "A") <> "test1" Or Cells(x, "A") <> "test2" Then
Cells(x, "A").EntireRow.Delete
End If
Basically delete the row if the contents of the cell does not contain "test1" or "test2" in my example below.
I loop through the rows using x (looping code is not included below).
Thanks for any quick help...
JimS
If Cells(x, "A") <> "test1" Or Cells(x, "A") <> "test2" Then
Cells(x, "A").EntireRow.Delete
End If