S Suri New Member Sep 14, 2012 #1 Hi i Have background colore Excel I want to delete no background colore row I want only background colore data
Hi i Have background colore Excel I want to delete no background colore row I want only background colore data
D Dinesh121 Member Sep 14, 2012 #2 Hey Suri, let me know if this works Sub deleteRows() Dim i As Long, lastRow As Long lastRow = 10 For i = lastRow To 1 Step -1 If ActiveSheet.Cells(i, 1).Interior.Color = 16777215 Then ActiveSheet.Rows(i & ":" & i).EntireRow.Delete End If Next i End Sub -Dinesh
Hey Suri, let me know if this works Sub deleteRows() Dim i As Long, lastRow As Long lastRow = 10 For i = lastRow To 1 Step -1 If ActiveSheet.Cells(i, 1).Interior.Color = 16777215 Then ActiveSheet.Rows(i & ":" & i).EntireRow.Delete End If Next i End Sub -Dinesh