Deleting rows without a fill

  • Thread starter Thread starter Glenn
  • Start date Start date
G

Glenn

I want to delete rows that don't have a fill color. I've
tried

ElseIf .Cells(Lrow, "A").Interior.ColorIndex = 0
then .Rows(Lrow).Delete

within a loop but it doesn't work, yet when I try the
same statement with another fill number, like 40, it does
delete those rows.

Any help would be appreciated!

Glenn
 
no fill color is xlNone

ElseIf .Cells(Lrow, "A").Interior.ColorIndex = xlNone then
.Rows(Lrow).Delete

? xlNone
-4142
 
Thanks, Tom! That did it.


Tom Ogilvy said:
no fill color is xlNone

ElseIf .Cells(Lrow, "A").Interior.ColorIndex = xlNone then
.Rows(Lrow).Delete

? xlNone
-4142
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top