• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Code Required For Row delete

Suri

New Member
Hi


i Have background colore Excel


I want to delete no background colore row


I want only background colore data
 
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
 
Back
Top