How to Sort in Excel by Color [3 Techniques]

Microsoft Excel allows us to sort data in Excel based on cell colors, font colors, and conditional formatting colors. In this article, you will learn 3 techniques to sort in Excel by color.

Use the Sort Command to Sort in Excel by Cell Color

If you want to sort data in Excel based on cell color, follow the steps below:

  1. Click on any cell of your dataset.
  2. Go to the Data tab and click on the Sort button.
    Go to the Data tab and click on the Sort button to sort in Excel by cell color
    The Sort dialog box will appear.
  3. Under the Column section, select the name of the column to sort based on that column’s data.
    For this instance, I’m selecting the column “Author”. Because I want to sort based on the cell colors of this column.
  4. From the Sort On section, select Cell Color.
  5. In the Order section, select the cell color that you want to keep at the top.
    I’m selecting the Green color for now.
  6. After that click on the Copy Level button.
    This will copy the setting that you’ve just set and create another level for you.
    You can also click on the Add Level button. But that will create a brand new level and you have to tweak the settings from scratch then.
    The Sort dialog box: Sort in Excel by cell color
  7. In the copied layer, select another cell color and click on the Copy Level again.
    Select another cell color and click on the Copy Level again
  8. This time, select the next cell color that you want to keep after your previous selection of cell colors.
    Then, continue this process until you are done with all the cell colors.
  9. After making the order of all the cell colors, hit the OK button.

Selecting cell colors in Sort dialog box

Now you will have your data sorted by their cell colors as in the picture below:

Sort data in Excel based on cell color

Sort in Excel by Font Color

If you have data with various font colors and want to sort them according to their font colors, then proceed with the following steps.

  1. First of all, select any cell of your data table.
  2. Then go to Data > Sort.
    Go to Data > Sort to sort in Excel by font colorThe Sort dialog box will appear.
  3. Select the column name to sort based on its font colors in the Column section.
  4. Choose a Font Color in the Sort On section.
  5. Then choose a font color from the Order section and hit the Copy Level button.
    The Sort dialog box: Sort in Excel by font color
  6. Select another font color in the copied level and hit the Copy Level button again.
    Select another font color in the copied level and hit the Copy Level button again
  7. Choose another font color in the copied level and continue this process until you are done choosing all the font colors.
  8. Finally hit the OK button.

Continue this process until you are done choosing all the font colors

Now, your data will be sorted based on their font colors as in the picture below:

Sort in Excel by font color



Sort in Excel by Color with Conditional Formatting Command

The usage of Conditional Formatting icons is one of the convenient ways to format data based on their properties. Excel allows sorting data based on Conditional Formatting colors.

If you are looking for ways to sort your data based on the Conditional Formatting icons, follow the steps below:

  1. Click on any cell of your dataset.
  2. Then, go to the Data tab and hit the Sort button.
    Go to the Data tab and hit the Sort button to Sort by Conditional Formatting Color in Excel
  3. Select the name of the column in the Column section where the Conditional Formatting icons are.
  4. Then move on to the Sort On section and choose the Conditional Formatting icon.
  5. In the Order section, choose the first Conditional Formatting icon that you want to put on the top.
  6. Then hit the Copy Level button.
    Move on to the Sort On section and choose the Conditional Formatting Icon
  7. Select another Conditional Formatting icon in the copied level.
  8. Then hit the Copy Level button again.
    Selecting cell colors and choosing copy level in the sort dialog box
  9. Go ahead with selecting another Conditional Formatting icon and continue this process until all the icons are selected.
  10. Finally hit the OK button to see the changes.

Finally hit the OK button to see the changes

Finally, you will see your data sorted as per the Conditional Formatting icons just like in the picture below:

Sort by Conditional Formatting Color in Excel

How to Sort Rows by Color in Excel

If you have rows with different colors, you can easily sort them based on the row colors. Now, follow the steps below to sort rows by color in Excel:

  1. First of all, click on any row to select.
  2. Then go to the Data tab and hit the Sort button.
    Navigating to the Data tab to choose Sort option in Excel
    The Sort dialog box will appear.
  3. Now select any column name in the Column section.
  4. Select Cell Color from the Sort On drop-down.
  5. From the Order drop-down, select any row color that you want to keep at the top.
  6. After that hit the Copy Level button.
    Choosing option of sort by and sort on in the Sort dialog box in Excel
  7. Then choose another row color from the Oder drop-down and hit the Copy Level button again.
    Choosing another level to sort and copy level option
  8. Choose the next row color that you want to keep after your previous selections of row colors.
    Now continue this process on and on until you are done sorting all the row colors.
  9. Finally hit the OK command to apply changes.

Adding another level to sort by color in Excel

After that, you will see your rows sorted by color just like in the picture below:

Sort Rows by Color in Excel



Conclusion

In this article, I’ve discussed sorting techniques in Excel based on cell color, font color, and conditional formatting icons. Feel free to comment on anything regarding the topic. I will try to respond as soon as possible.

Frequently Asked Questions

Why can’t I sort by color in Excel?

Excel’s native sorting functionality does not directly support sorting by cell color. However, you can achieve sorting by color through a workaround:

  1. Add a Helper Column: Add a new column next to your data.
  2. Use Conditional Formatting: Apply different colors based on the criteria you want to sort.
  3. Sort Based on the Helper Column: Sort the data based on the values in the helper column.

This indirect method allows you to sort data by color in Excel. Keep in mind that Excel might have introduced new features or changes since my last update, so it’s a good idea to check the latest Excel documentation for any updates on this functionality.

How do I filter by color in Excel?

In Excel, you can filter data by color using the following steps:

  1. Click on a cell within the data range.
  2. Click on the Data tab in the Excel ribbon.
  3. In the Sort & Filter group, click on the Filter button. This will add filter arrows to the headers of your selected range.
  4. Click on the filter arrow in the column header.
  5. Hover over “Filter by Color” in the dropdown menu.
  6. Choose the color you want to filter by. Excel will filter the data to display only the rows with cells matching the selected color.

By following these steps, you can easily filter data based on cell colors in Excel.

What is the formula for colored cells in Excel?

In Excel, there isn’t a specific formula for colored cells. The color of a cell is determined by formatting, not by a formula. However, you can use conditional formatting to apply colors based on specific conditions. To apply conditional formatting:

  1. Select the cell or range of cells.
  2. Go to the Home tab.
  3. Click on Conditional Formatting in the toolbar.
  4. Choose the desired rule, such as Highlight Cells Rules or New Rule.
  5. Set the conditions and choose the formatting options, including color.

Conditional formatting allows you to automatically apply colors to cells based on the values or criteria you specify. There isn’t a single formula for colored cells; rather, you use conditional formatting rules to achieve the desired visual representation in Excel.

Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *