How to Sort by Color in Excel

Last Updated: March 24, 2024

- Written by Puneet

Yes, you can sort data by color in Excel. There’s an option for that. With this option, you need to create a custom sorting order using the cells or cell color. Below is a list of names; we need names with the yellow cell color on the top.


Steps Sort Data by Color in Excel

  1. Select the cell from the data and go to the Data Tab > Sort.
  2. After that, in the Sort dialog box, click on the “Sort On” drop down and select “Cell Color”.
  3. Next, select the color from the “Order” you want to put on first order while sorting.
  4. Now click on the “Add Level Button” and create a new order with the color you want to put on the second order.
  5. From here, create a third order just like the first two, or you can skip this step as we have only one cell color left.
  6. In the end, click OK to apply the sort.

When you click OK, it will sort the cells with the color order you created in the sorting dialog box.


In the same way, you can use the font color instead of the cell color from the “Sort On” drop down menu.


Put Selected Color on the Top Rest Random

There is also a quick way to help you put a single-color cell at the top.

  1. Select a cell with the color you want to put on the top for the sort.
  2. After that, right-click.
  3. Now, go to the “Sort” option.
  4. Click “Put Selected Cell Color on the Top” from here.

And the moment you click it, it puts cells with the “Yellow” color at the top of the sorting.


Get the Excel File