To delete specific color index row
Hi,
I tried to run the macro code below, but it does not even run when i
execute. Not sure if i have typed the code correctly??? Can someone advise?
Sub Testing()
ActiveSheet.Activate
Range("A1").Select
For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row
If Rows(i).Interior.ColorIndex = 6 Then
Rows(LastRow).Select
Selection.Delete
i = i + 1
End If
Next i
End Sub
|