Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 139
Default filter by colored cell?

Is there a way to filter my spreadsheet based on the background color of a
cell/row?

I have a very large spreadsheet with several hundered rows and about 6
different colored backgrounds. Each colored row has its own meaning. Is
there a way to filter so I can view only the blue rows or only the yellow
rows?

Thanks!
--
Tina
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default filter by colored cell?

There's no built in method of doing this for XL versions earlier than XL
2007. However, there are some macros that can be written:
http://www.cpearson.com/excel/SortByColor.htm

If you want to avoid macros you may find it useful to assign a numerical
code to each color, code the colored rows accordingly, and filter on that
numerical code.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Tina" wrote:

Is there a way to filter my spreadsheet based on the background color of a
cell/row?

I have a very large spreadsheet with several hundered rows and about 6
different colored backgrounds. Each colored row has its own meaning. Is
there a way to filter so I can view only the blue rows or only the yellow
rows?

Thanks!
--
Tina

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default filter by colored cell?

Tina

You can use a function to number the rows and filter on those numbers.

This function from Chip Pearson will do the trick.

Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
'
' This function returns the ColorIndex value of a the Interior
' (background) of a cell, or, if OfText is true, of the Font in the cell.
'
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange.Font.ColorIndex
Else
CellColorIndex = InRange.Interior.ColorIndex
End If
End Function

Usage is..........=CellColorIndex(A1) entered in helper column.

Drag/copy that to bottom of data range.

First off.........save a backup of your workbook.

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there.

Save the workbook and hit ALT + Q to return to Excel window.

Enter the formula in a helper column as explained above.


Gord Dibben MS Excel MVP

On Mon, 12 Feb 2007 11:49:00 -0800, Tina wrote:

Is there a way to filter my spreadsheet based on the background color of a
cell/row?

I have a very large spreadsheet with several hundered rows and about 6
different colored backgrounds. Each colored row has its own meaning. Is
there a way to filter so I can view only the blue rows or only the yellow
rows?

Thanks!


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,979
Default filter by colored cell?

Ron de Bruin has an EasyFilter add-in that you can download, and use to
filter by colour:

http://www.rondebruin.nl/easyfilter.htm

Tina wrote:
Is there a way to filter my spreadsheet based on the background color of a
cell/row?

I have a very large spreadsheet with several hundered rows and about 6
different colored backgrounds. Each colored row has its own meaning. Is
there a way to filter so I can view only the blue rows or only the yellow
rows?

Thanks!



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

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
sumproduct and colored cell as a condition to be met George P Excel Worksheet Functions 2 January 9th 07 05:18 PM
Cell shading with colored patterns Eric Excel Discussion (Misc queries) 2 November 16th 06 07:06 PM
Colored Tabs Woody13 Excel Discussion (Misc queries) 2 April 11th 06 09:07 PM
SUMIF cell is colored dtencza Excel Discussion (Misc queries) 8 August 18th 05 05:50 PM
get a colored text in one cell to appear the same way in others anton Excel Discussion (Misc queries) 3 July 28th 05 06:25 PM


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