ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting rows without a fill (https://www.excelbanter.com/excel-programming/289118-deleting-rows-without-fill.html)

Glenn

Deleting rows without a fill
 
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

Tom Ogilvy

Deleting rows without a fill
 
no fill color is xlNone

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

? xlNone
-4142



--
Regards,
Tom Ogilvy

Glenn wrote in message
...
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




John Wilson

Deleting rows without a fill
 
Glenn,

Try .ColorIndex = -4142

John

"Glenn" wrote in message
...
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




Glenn

Deleting rows without a fill
 
Thanks, Tom! That did it.


"Tom Ogilvy" wrote in message
...
no fill color is xlNone

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

? xlNone
-4142



--
Regards,
Tom Ogilvy

Glenn wrote in message
...
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






Glenn

Deleting rows without a fill
 
Thanks John! That, in addition to 'XLNONE' works too!

"John Wilson" wrote in message
...
Glenn,

Try .ColorIndex = -4142

John

"Glenn" wrote in message
...
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







All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com