SandsB
Well-known Member
- Joined
- Feb 13, 2007
- Messages
- 730
- Office Version
- 365
- Platform
- Windows
My code is below. It works but I do this loop for a couple dozen kinds of records. The loop below says delete the row if the value of a cell = AX. Then I run the same loop for AT, then for FE, then LQ, then PD, etc. etc.etc. How can I change this so the loop runs once and deletes the record if it contains either AX or AT or FE or LQ, etc.?
For i = Last To 1 Step -1
If (Cells(i, "I").Value) = "AX" Then
'Cells(i, "A").EntireRow.ClearContents
Cells(i, "A").EntireRow.Delete
End If
Next i
For i = Last To 1 Step -1
If (Cells(i, "I").Value) = "AX" Then
'Cells(i, "A").EntireRow.ClearContents
Cells(i, "A").EntireRow.Delete
End If
Next i