Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Filter by color

Hi,

I have a large spreadsheet. Many of the cells are highlighted with different
colors. I want to filter the database according to color like select the
cells with red background color only.
Is it possible?
Thank You in advance.


Regards,
Pawan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Filter by color



"Pawan" wrote:
I have a large spreadsheet. Many of the cells are highlighted with different
colors. I want to filter the database according to color like select the
cells with red background color only.
Is it possible?


In place filtering can be a bit complex to achieve, an easier way is to copy
the values to another worksheet. For example if you have two columns of data
and you want to extract the rows where cells in col 2 have red background
color.

Private Sub CommandButton1_Click()
Dim j As Integer, row As Integer
row = 1
For j = 1 To 100
If Cells(j, 2).Interior.Color = vbRed Then
Worksheets("Sheet2").Cells(row, 1).Formula = Cells(j, 1).Formula
Worksheets("Sheet2").Cells(row, 2).Formula = Cells(j, 2).Formula
row = row + 1
End If
Next j
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Filter by color

You could try adding a new column, using a UDF to populate the values.

Eg:

Function GetColor(c)
GetColor=c.interior.colorindex
End Function

Then filter on the new column

Tim.


"Pawan" wrote in message
...
Hi,

I have a large spreadsheet. Many of the cells are highlighted with
different
colors. I want to filter the database according to color like select
the
cells with red background color only.
Is it possible?
Thank You in advance.


Regards,
Pawan



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Filter by color

Hi Pawan,

Depending on your data configuration, you may be able to add a helper column
and use a function, provided by Chip Pearson, to return the background
colour. You could then filter on the helper column.

See Chip Pearson's 'Sorting By Color' page at:

http://www.cpearson.com/excel/SortByColor.htm

See particulatly Chip's ColorIndexOfCell function.


---
Regards,
Norman



"Pawan" wrote in message
...
Hi,

I have a large spreadsheet. Many of the cells are highlighted with
different
colors. I want to filter the database according to color like select the
cells with red background color only.
Is it possible?
Thank You in advance.


Regards,
Pawan



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Filter by color

Hi Tim,

My apologies - your post was not visible to me when I responded.

---
Regards,
Norman


"Tim Williams" <saxifrax@pacbell*dot*net wrote in message
...
You could try adding a new column, using a UDF to populate the values.

Eg:

Function GetColor(c)
GetColor=c.interior.colorindex
End Function

Then filter on the new column

Tim.


"Pawan" wrote in message
...
Hi,

I have a large spreadsheet. Many of the cells are highlighted with
different
colors. I want to filter the database according to color like select the
cells with red background color only.
Is it possible?
Thank You in advance.


Regards,
Pawan







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Filter by color

Ron de Bruin has an addin that filters by colour amongst other things, at
http://www.rondebruin.nl/easyfilter.htm. Scroll down to the foot of the page
to get the Beta version.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pawan" wrote in message
...
Hi,

I have a large spreadsheet. Many of the cells are highlighted with

different
colors. I want to filter the database according to color like select the
cells with red background color only.
Is it possible?
Thank You in advance.


Regards,
Pawan



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
Filter by Color dwake Excel Discussion (Misc queries) 1 May 10th 10 09:54 PM
Filter by Color Chin via OfficeKB.com Excel Worksheet Functions 0 June 22nd 09 01:46 AM
filter by color Namvar Excel Discussion (Misc queries) 1 January 20th 09 11:44 PM
Filter by Color Javid Excel Discussion (Misc queries) 1 February 14th 05 11:00 AM
Filter by color of row Brie Excel Worksheet Functions 1 February 1st 05 07:13 PM


All times are GMT +1. The time now is 02:54 AM.

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"