How to sort by color in excel
Tutor 5 (273 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To sort by color in Excel, sort the worksheet based on the cell fill color or font color to group similar colored entries together.
Sorting by cell color organizes rows based on the background color assigned to the cells in a specific column.
Windows
-
Select any cell within the column that contains the colored cells.
-
Go to Home → Sort & Filter → Custom Sort.
-
Select the column under Column.
-
Select Cell Color under Sort On.
-
Choose the color to sort by under Order.
-
Select On Top or On Bottom.
-
Confirm with OK.
Mac
-
Select a cell inside the target column.
-
Go to Data → Sort.
-
Select the column in the Column dropdown.
-
Set Sort On to Cell Color.
-
Pick the color under Order.
-
Select On Top or On Bottom.
-
Confirm with OK.
How to sort by font color
Sorting by font color arranges rows according to the text color used in the chosen column.
Windows
-
Click inside the column where the font colors appear.
-
Select Home → Sort & Filter → Custom Sort.
-
Select the column.
-
Set Sort On to Font Color.
-
Select the color under Order.
-
Choose On Top or On Bottom.
-
Click OK.
Mac
-
Click a cell in the column with the colored text.
-
Go to Data → Sort.
-
Pick the column.
-
Set Sort On to Font Color.
-
Choose the color.
-
Select On Top or On Bottom.
-
Apply with OK.
How to sort by multiple colors
Sorting by multiple colors requires stacking multiple sort levels.
Windows
-
Select a cell inside the target column.
-
Select Home → Sort & Filter → Custom Sort.
-
Add the first sort level using Add Level.
-
Choose Cell Color or Font Color.
-
Select the color and placement.
-
Add another level.
-
Repeat for each color.
-
Select OK.
Mac
-
Select a cell in the relevant column.
-
Go to Data → Sort.
-
Add the first level.
-
Choose Cell Color or Font Color.
-
Select the color and placement.
-
Add more levels for the remaining colors.
-
Finish with OK.
How to sort with conditional formatting colors
Conditional formatting colors behave like normal cell colors in sorting.
Windows and Mac
-
Select a cell in the formatted column.
-
Open Custom Sort (Windows: Home → Sort & Filter, Mac: Data → Sort).
-
Choose the column.
-
Set Sort On to Cell Color or Font Color.
-
Pick the conditional formatting color.
-
Select On Top or On Bottom.
-
Confirm with OK.
Why sorting by color may not work
Color sorting fails when the colors appear similar but are different HEX values or when colors come from unsupported formats.
Common causes:
-
Slight color variations from manual shading (difference can reach 1–3%).
-
Colors created through themes rather than standard palette values.
-
Mixed conditional formatting rules.
-
The table format blocks some sort of options.
How to fix issues with sorting by color
-
Recolor the cells using the same fill color swatch.
-
Remove conflicting conditional rules.
-
Convert a table back to a range: Table Design → Convert to Range.
-
Standardize theme colors.
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