Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 PM
Help!! I have problem deleting 2500 rows of filtered rows!!!! shirley_kee Excel Discussion (Misc queries) 1 January 12th 06 03:24 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"