Hi schueyisking,
That code would work if the cells in column A had data in them. The reason it doesn't work is that the line
Last = Range("A" & Rows.Count).End(xlUp).Row
ends up as being 1 because that line is looking for data in Column A.
If, however, you selected all the cells you need in Column A and then run this code it should do what you want:
Private Sub CommandButton1_Click()
For i = Selection.Rows.Count To 1 Step -1
If Range("A" & i).Interior.ColorIndex = xlNone Then
Range("A" & i).EntireRow.Delete
End If
Next i
End Sub
Bookmarks