I need to filter based on colour

  • Thread starter Thread starter Jimmy
  • Start date Start date
J

Jimmy

Hello I have a spreadsheet of Excel 2003 in which in one column (column B)
there are entries coloured yellow and some with no colour (white). I need to
filter and see only the yellow entries . But I need to filter all the
columns of the spreadsheet based upon the yellow colour of column B. So I
can see all the information in every other column of those yellow entries of
column B.
Can someone help me?
Thanks
Jimmy
 
Unless all the yellows are derived from the same formula for a custom
autofilte then you would need to have a for each loop macro that hid the non
yellow rows.
 
Isn't there an easier way? I read in an older posting that it was quite
simple. But can't find that posting.
 
You could create a VBA Function to return the color of the cell


Code
-------------------
Function coloring(cell)
coloring = cell.Interior.ColorIndex
End Functio
-------------------

Suppose your colored cells are in column A
Then insert a column in your sheet in which you enter/propogate th
Excel formula
Color Index
=coloring(A2)
=coloring(A3)
....etc.

Then select the entire table you wish to filter and us
Data>Filter>AutoFilter
This will provide dropdowns in the first row of your selection
Then by using the drop down on the Color Index column you created, yo
can select say 6, and all yellow rows will be shown, 3 for red, etc. I
you insert your column to the right of the colored cells, the colo
number to select should be obvious.

Regards
Bria
 
Back
Top