Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Deletion of rows according to background color

I have an excelsheet wherby rows having different
background colors. How can i select certain background
color and delet the remaining.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Deletion of rows according to background color

Salim,

You could do it this way

write a UDF to determine the ColoIndex of a cell
in the adjacent column, use the UDF to get the Colorindex
filter on this column
select not equal to hour value
Delet visible rows

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"salim" wrote in message
...
I have an excelsheet wherby rows having different
background colors. How can i select certain background
color and delet the remaining.
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Deletion of rows according to background color

To Me it looks like headlines can you please elaborate
Thanks
-----Original Message-----
Salim,

You could do it this way

write a UDF to determine the ColoIndex of a cell
in the adjacent column, use the UDF to get the Colorindex
filter on this column
select not equal to hour value
Delet visible rows

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"salim" wrote in

message
...
I have an excelsheet wherby rows having different
background colors. How can i select certain background
color and delet the remaining.
Thanks



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deletion of rows according to background color

Here is an additional approach:
assume the colors are at least in column A

Sub DeleteColor()
Dim rng As Range, LastRow As Long
Dim i As Long
Set rng = ActiveSheet.UsedRange.Columns(1).Cells
LastRow = rng(rng.Count).Row
For i = LastRow To 1 Step -1
idex = Cells(i, 1).Interior.ColorIndex
Select Case idex
Case 3, 8, 9, 21
Cells(i, 1).EntireRow.Delete
End Select
Next
End Sub


--
Regards,
Tom Ogilvy




wrote in message
...
To Me it looks like headlines can you please elaborate
Thanks
-----Original Message-----
Salim,

You could do it this way

write a UDF to determine the ColoIndex of a cell
in the adjacent column, use the UDF to get the Colorindex
filter on this column
select not equal to hour value
Delet visible rows

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"salim" wrote in

message
...
I have an excelsheet wherby rows having different
background colors. How can i select certain background
color and delet the remaining.
Thanks



.



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
find excel rows with a background color Lou Excel Discussion (Misc queries) 4 May 24th 07 01:27 AM
Default Border, Font Color, and Cell Background Color Elijah Excel Discussion (Misc queries) 1 October 28th 05 04:10 PM
can you select rows in excel with a certain background color? stelee Excel Worksheet Functions 1 August 3rd 05 04:04 PM
Identify rows with certain background color? DonLi Excel Programming 4 January 23rd 04 10:38 PM
Background color for 50,000 odd-numbered rows lothario[_42_] Excel Programming 4 November 2nd 03 05:39 AM


All times are GMT +1. The time now is 10:49 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"