Filtering by color

bucci35

Active Member
Joined
Jul 6, 2002
Messages
350
Office Version
  1. 365
Platform
  1. Windows
Is thier a way to filter by either cell color or font color?
Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
what do I do with this udf? looks like some kind of vba code or something. I'm not too advanced in this stuff.

thanks,
 
Upvote 0
This works great, but now that I installed this how can I incorporate this to work inside of a macro?
 
Upvote 0
Hi bucci35

You can't, but that wasn't your question. Refer you back to Richard's post.

DominicB
 
Upvote 0
Hi bucci35

Enter this code into a blank module within your project (Alt+F11, Insert > Module) :

Code:
Function CellColour(UsrRng As Range) As Integer
Application.Volatile True
CellColour = UsrRng(1, 1).Interior.ColorIndex
End Function

Lets say the range you want to filter is A1:E100, and the coloured cells are in column A. In cell F1 put the formula : =CellColour(A1) and copy it down.

This will return the ColorIndex value of each cell in column A. You can now record your macro, but filter by column F (not A), but the end result will have the same efect as if you'd filtered by colour in column A.

Next time you post remember to be more explicit about what you want - you'll get an answer quicker, and better tailored to what you want.

HTH

DominicB
 
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,686
Members
449,048
Latest member
81jamesacct

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