-
I believe this one should do it:
[VBA]
Sub deleter()
Application.ScreenUpdating = False
Dim i As Long, lRow As Long
lRow = Cells(Rows.Count, 4).End(xlUp).Row
For i = lRow To 2 Step -1
If Not ((Cells(i, 18) <> "" And Cells(i, 18) < Date And Cells(i, 19) = "" And Cells(i, 21) = "") Or _
(Cells(i, 22) = "" And Cells(i, 20) < Date And Cells(i, 20) <> "")) Then
Cells(i, 1).EntireRow.Delete
End If
Next
Application.ScreenUpdating = True
End Sub
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules