A
Ashley via OfficeKB.com
I don't know what's wrong!! I'm trying to delete an entire row if the word
CLOSED is found in column U here's what I have but it doesn't do anything
Dim Lastrow As Long
Dim row_index As Long
Application.ScreenUpdating = False
lastrow = ActiveSheet.Cells(Rows.Count, 21).End xlUp).Row
For row_index = lastrow -21 To 21 Step -21
If Cells(row_index,21). Value = "CLOSED" Then
Rows(row_index).Delete
End If
Next
Application.ScreenUpdating = True
End Sub
CLOSED is found in column U here's what I have but it doesn't do anything
Dim Lastrow As Long
Dim row_index As Long
Application.ScreenUpdating = False
lastrow = ActiveSheet.Cells(Rows.Count, 21).End xlUp).Row
For row_index = lastrow -21 To 21 Step -21
If Cells(row_index,21). Value = "CLOSED" Then
Rows(row_index).Delete
End If
Next
Application.ScreenUpdating = True
End Sub