filter by background color

MikeL

Active Member
Joined
Mar 17, 2002
Messages
488
Office Version
  1. 365
Platform
  1. Windows
I am using XL 2000. My question is:
How do I filter by background color?

For example, if the background of cells A1 and A3 are colored Yellow and Cells A2, A4 and A5 are blank, is there a way to filter the yellow cells? Or vice versa the blanks?

I have used a color sort macro to get all the same colors adjacent to each other, but I am looking to do this using a Filter.

Thanks in advance,
MikeL
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I don't think there is a filter that will do what you want. The only alternative I can suggest is to hide the unwanted rows in your macro. This will produce the same sort of result a filter would. You would then have to unhide the rows when you want to see all the data again.
 
Upvote 0
Provided that the colours are not the result of conditional formatting, it could be done by adding a column to contain a formula that returns the colour codes and then filtering by that column :-

1. Go to Insert>Names>Define.
2. In the NamesInWorkbook box type Clr
3. In the RefersTo box type =GET.CELL(38,INDIRECT("rc[1]",FALSE))
4. Click OK
5. Insert a column immediately before the column with the colours
6. In the first cell of the inserted column type =Clr
7. Fill down as far as required. This returns the colour codes.
8. Filter by the inserted column.

NB :
Do not copy/paste to a different worksheet any cells that contain the formula =Clr , since it will cause XL to crash.
 
Upvote 0
Here ya' go, Mike. Trick the little ******; use a Custom AutoFilter with the same criteria you used for your Conditional Formatting:
Book1
ABCDEFG
1
2This,
3Unfiltered
4CustomerDateWeightShiptoStateConditionalFormat
5Barry1/1/20032500NJofcellsB5:B8
6Larry1/5/20034500NYFormulais:
7Harry1/7/20033000CA=OR($E5="NY",$E5="CA")
8Moe1/7/20036000NJ(Tohi-liteallNewYork&Calif.)
9
10ResultsData/Filter/AutoFilterof
11inthis,columnE(ShiptoState)
12Filteredsetto"Custom",
13CustomerDateWeightShiptoStateCondition1:equalsNY
14Larry1/5/20034500NYor
15Harry1/7/20033000CACondition2:equalsCA
16
Sheet3
 
Upvote 0

Forum statistics

Threads
1,214,570
Messages
6,120,294
Members
448,953
Latest member
Dutchie_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top