Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub DelRows()
- Application.ScreenUpdating = False
- Dim LastRow As Long
- LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
- Dim x As Long
- For x = LastRow To 2 Step -1
- If Cells(x, 1) = Cells(x - 1, 1) Then
- If Cells(x,2) = Cells(x - 1, 2) Then
- Rows(x).EntireRow.Delete
- End If
- End If
- Next x
- Application.ScreenUpdating = True
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement