Filtering

B

bholeprashantr

Dear All,
Is there any way to use filter command on basis of colour or select all
the cells containing particular colour.

Please guide me in this regards.

Thanks and Regards


Prashant Bhole
 
M

MartinShort

Not exactly. However with Excel most things are possible.

Set up a Macro something like the following:

Code
-------------------
Sub CellColour()
Dim CellColourIndex As Integer
Dim i As Integer
For i = 1 To 10
Range("A" & i).Select
CellColourIndex = Selection.Interior.ColorIndex
Range("B" & i) = CellColourIndex
Next i
End Su
-------------------
When run, this will add a number to column B, based on the colour in th
corresponding cell in column A.

All you need to do now is apply your filter on your "helper" column
which can remain hidden from view. If you use the Macro recorder t
record your FilterOn and FilterOff commands, you can customise th
filter on Macro to include the above code so the whole job could b
called from a menu command or couple of buttons on the worksheet.

I hope this helps - I'm also sure that someone will come up with
different way of doing it, but I know this works
 
Top