Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter by Color | Excel Discussion (Misc queries) | |||
Filter by Color | Excel Worksheet Functions | |||
filter by color | Excel Discussion (Misc queries) | |||
Filter by Color | Excel Discussion (Misc queries) | |||
Filter by color of row | Excel Worksheet Functions |