View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Junior728 Junior728 is offline
external usenet poster
 
Posts: 44
Default 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