Microsoft Excel logo.

Using Microsoft Excel’s sorting feature, you can sort your cells that are either manually colored or conditionally colored by their color. This works for multiple colors and we’ll show you how to implement it in your spreadsheets.

  1. With your spreadsheet open, in the ribbon click Data > Sort.
  2. In the “Sort By” dropdown menu select the column you want the data sorted by.
  3. From the “Sort On” list, select “Cell Color,” then choose a color and location for sorting.
  4. Add as many levels as needed, then click “OK.”

With the feature, you can place the cells containing a specific color at the top or the bottom of the list. For example, you can place all your green-colored cells at the top while keeping all the red ones at the bottom.

You can sort by a cell’s background color as well as the font color, as we’ll explain below.

RELATED: How to Sort and Filter Data in Excel

Sort Data by Cell Color or Font Color in Excel

To start sorting, open your spreadsheet with Microsoft Excel. In your spreadsheet, click any cell in your dataset.

Select a cell in a dataset.

From Excel’s ribbon at the top, select the “Data” tab.

Access the "Data" tab.

On the “Data” tab, from the “Sort & Filter” section, choose “Sort.”

A “Sort” window will open. If your dataset has headers, then in this window’s top-right corner, enable the “My Data Has Headers” option.

Click the “Sort By” drop-down menu and select the column whose data you want to sort. From the “Sort On” drop-down menu, if you want to sort your cells by their background color, choose “Cell Color.” To sort cells by their font color, select “Font Color.” We’ll go with the former option.

Next, click the “Order” drop-down menu and choose the color you want to keep at the top or at the bottom. Next to this drop-down, click another drop-down and select where you want to place the cells containing the selected color. Your options are “On Top” and “On Bottom.”

If you have three or more color cells in your dataset, feel free to add another sorting level by clicking “Add Level” at the top of the “Sort” window.

Finally, at the bottom of the window, click “OK” to apply your changes.

Sort data by color in Excel.

Back on your spreadsheet window, you will see your cells sorted by their color.

Tip: If you’d like to undo your changes, then quickly press the Ctrl+Z (Windows) or Command+Z (Mac) keyboard shortcut. This will remove the sorting you’ve applied to your dataset.

Data sorted by color in Excel.

And that’s how you quickly filter your data using your cells’ color in Excel spreadsheets. Very useful!

Did you know you can sort your Excel data by date as well? Check out our guide to learn how.

RELATED: How to Sort by Date in Microsoft Excel

Profile Photo for Mahesh Makvana Mahesh Makvana
Mahesh Makvana is a freelance tech writer who specializes in writing how-to guides. He has been writing tech tutorials for over a decade now. He’s written for some of the prominent tech sites including MakeUseOf, MakeTechEasier, and Online Tech Tips.
Read Full Bio »