Hello all,
I'm trying to figure out how to change this code to delete all color rows rather than just red. Is there an easier way to get this done? Thanks in advance.
I'm trying to figure out how to change this code to delete all color rows rather than just red. Is there an easier way to get this done? Thanks in advance.
VBA Code:
Sub sbDelete_Rows_Cell_Color()
Dim lRow As Long
Dim iCntr As Long
lRow = 2000
For iCntr = lRow To 1 Step -1
If Cells(iCntr, 1).Interior.ColorIndex = 3 Then '3 = Red
Rows(iCntr).Delete
End If
Next
End Sub