I am trying to use a for loop to delete conditionally formatted duplicates, but I keep getting an error on the "End If". Can someone review this code to see what can replace the "End If" with correct syntax to makes the for loop operational?
Sub sbDelete_Rows_Based_On_Cell_Color()
Dim lRow As Long
Dim iCntr As Long
lRow = 14090
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
Bookmarks