J
J.W. Aldridge
need to delete all rows except those containing "apples" and or
"oranges" in column G.
code below works, just need to add second criteria.
assuming that "a" would be changed to "g".
Sub Delete_Row()
For i = Cells(Rows.Count, "a"). _
End(xlUp).Row To 2 Step -1
If InStr(UCase(Cells(i, "a")), "MZ")<1 _
Then Rows(i).Delete
Next i
End Sub
"oranges" in column G.
code below works, just need to add second criteria.
assuming that "a" would be changed to "g".
Sub Delete_Row()
For i = Cells(Rows.Count, "a"). _
End(xlUp).Row To 2 Step -1
If InStr(UCase(Cells(i, "a")), "MZ")<1 _
Then Rows(i).Delete
Next i
End Sub