How to filter by multiple colors in excel
Tutor 5 (273 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To filter by multiple colors in Excel, use the built-in Filter menu and apply the “Filter by Color” feature for each color category. Excel does not support selecting several colors at the same time through a single filter command, so the process uses helper columns or repeated filtering depending on the layout of the data.
Understanding How Excel Handles Color Filters
Excel filters one color per column through the standard Filter menu. A second color requires a helper column or the Advanced Filter feature to capture rows with additional colors. This design applies to both Windows and Mac, although the menu layout has minor visual differences. The functionality and steps remain the same across both platforms.
Method 1: Filter by One Color at a Time
This method works when you only need to filter one color, view the results, and then apply the next color.
Steps
-
Select any cell in the dataset.
-
Open the Home tab.
-
Select Sort & Filter.
-
Choose Filter.
-
Open the filter dropdown on the column that has the colored cells.
-
Point to Filter by Color.
-
Select the color to display only rows with that color.
-
Repeat the process for the next color.
This method displays one color at a time. Excel replaces the color filter every time you select the next one.
Method 2: Use a Helper Column to Filter Multiple Colors at the Same Time
This method works when you want rows with several different colors to appear together.
Why a Helper Column Works
A helper column stores a text or number value that represents a color. Excel can evaluate several color conditions and return the rows that match any of them.
Steps
-
Insert a new column next to the colored data.
-
Enter a label such as ColorTag in the header.
-
Enter text values that represent each color category. For example:
-
Red cells: type Red
-
Blue cells: type Blue
-
Green cells: type Green
-
-
Fill the helper column down so each row has a tag.
-
Select the helper column’s filter dropdown.
-
Check multiple values such as Red, Blue, and Green.
-
Confirm the selection to display all rows that match any of the selected colors.
This solution works consistently on both Windows and Mac.
Method 3: Use Advanced Filter for Multiple Colors
Advanced Filter extracts rows that match several criteria at once. A criteria range identifies the colors to include.
Steps
-
Create a small criteria table above or below the dataset.
-
Add the helper field name ColorTag in one cell.
-
List the color tags you want to include in separate rows under the criteria header.
-
Select the full dataset including the helper column.
-
Go to Data → Advanced (in the Sort & Filter group).
-
Choose Filter the list, in-place or Copy to another location.
-
Set the Criteria Range to the small table containing the color tags.
-
Apply the filter.
The extracted list contains all rows whose colors appear in the criteria range.
Method 4: Convert Cell Color to a Sortable Number With VBA (Optional Technique)
Excel does not directly convert color to a sortable or filterable value. A simple VBA function creates a numeric color code so you can filter multiple colors at once. This technique requires enabling macros.
Understanding the Method
The function returns Excel’s color index for a cell. The helper column uses this code. The filter dropdown allows selecting multiple color indexes.
Steps
-
Press Alt + F11.
-
Select Insert → Module.
-
Paste a function such as:
Function GetColorIndex(Target As Range)
GetColorIndex = Target.Interior.ColorIndex
End Function
-
Return to the worksheet.
-
Enter
=GetColorIndex(A2)where A2 is the colored cell. -
Fill the formula down.
-
Filter the helper column for the color index values you need.
The method is identical on Windows and Mac, except Mac requires enabling macros through Excel → Preferences → Security & Privacy → Enable VBA macros.
Best Practices
-
Use consistent color coding across the worksheet to avoid mismatched categories.
-
Maintain a clear helper column so the filtering criteria remain visible.
-
Use Advanced Filter when managing large datasets with multiple repeated color combinations.
-
Create a legend in the worksheet for color categories when sharing the file with others.
Related Questions
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to sort by highlighted cells in excel
Answers · 1
How to sort excel by column and keep rows together
Answers · 1
How to sort by time in excel
Answers · 1
How to sort alphabetically in excel by last name
Answers · 1