![]()
Sub Reset() Dim i As Integer Dim LastRow As Integer Application.ScreenUpdating = False LastRow = Worksheets(ActiveSheet.Name).Cells(Rows.Count, 1).End(xlUp).Row 'This will find the last used row in column A For i = LastRow To 2 Step -1 If i <> 2 Then 'Skips Second Row If UCase(Cells(i, 2).Value) = "GOOD" Then 'Makes the word uppercase to avoid problems because good <> GOOD in VBA Rows(i - 1 & ":" & i).EntireRow.Delete 'delete the row with GOOD and the one above it. i = i - 1 'Since we deleted two rows, we need to move the counter an additional spot End If End If Next i Application.ScreenUpdating = True End Sub
Bookmarks