Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default delete uncolour row

Please help me!!
how to delete row where the row is not coloured

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 367
Default delete uncolour row

On Nov 7, 2:18 pm, wrote:
Please help me!!
how to delete row where the row is not coloured


Hi Isybel

It depends on how and when you want to delete them.
Do you want to this procedure once, or more often?

I'd say write a function which goes through all rows, look up the
interior.color value and delete those who are = xlnone
If you need help doing that, just ask.

hth

Carlo

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default delete uncolour row

I think this will give you what you want:
Sub DeleteAllUncolored()

Dim ClrRng As Range

Set ClrRng = Range("A1", Range("A5000").End(xlUp))
For Each cell In ClrRng
If cell.Interior.ColorIndex = xlNone Then
cell.EntireRow.Delete
End If
Next cell
End Sub

As always, be extremely careful when deleting date; try this macro on a
sample before you execute on your actual data.

Regards,
Ryan--


--
RyGuy


"carlo" wrote:

On Nov 7, 2:18 pm, wrote:
Please help me!!
how to delete row where the row is not coloured


Hi Isybel

It depends on how and when you want to delete them.
Do you want to this procedure once, or more often?

I'd say write a function which goes through all rows, look up the
interior.color value and delete those who are = xlnone
If you need help doing that, just ask.

hth

Carlo


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
delete the test values, but do not delete the formulas kathy Excel Discussion (Misc queries) 1 February 21st 07 07:03 PM
How can I delete a macro when the Delete button is not active? FCR Excel Worksheet Functions 0 March 9th 06 09:43 AM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
How do i delete a macro in Excel 2003 when delete isn't highlight Abel Excel Discussion (Misc queries) 2 September 13th 05 04:09 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM


All times are GMT +1. The time now is 07:20 PM.

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

About Us

"It's about Microsoft Excel"