Here is a simple script to delete rows that matches a criteria.
From 1 - 10, macro would go through a column 1 and look at the value, and if that value equals to 3, it would delete the entire row.
Sub Test2()
Dim X As Integer
For X = 1 To 10
If Cells(X, 1).Value <> 3 Then
Rows(X).EntireRow.Delete
End If
Next X
End Sub
When I run it, it doesn't behave as I thought,
This is what happened:
not sure why it would leave some entries behind but not others??