How To Sort By Color In Google Sheets

In this tutorial, you will learn how to sort by color in Google Sheets.

It’s common practice to color code spreadsheet data to assign different meanings to cells or rows. For example, a completed task in a schedule spreadsheet could be color coded green, while an urgent customer order in a sales spreadsheet could be colored red or orange. Color coding cells puts important information front and center and makes it easy to scan for relevant information, but sometimes with large data sets scanning a spreadsheet isn’t enough and it’s necessary to sort data in order to consolidate relevant info. While it might at first seem impossible to sort data based on colors since there is no column to sort by, it’s actually quite easy thanks to a useful feature in Google Sheets. Read on to learn how:

Creating a Filter

First before we can sort by color, we need to create a filter. Google Sheets Filters can not only hide certain data that the user doesn’t want to see, but can also sort data in various ways, including by color

To create a filter:

Step 1

Select the range you want to sort by color, including headers, and open the Data menu, then click Create a Filter

Step 2

The filtering icon will appear in each cell of the header range. You can click on this to open a menu with options to apply filters to the filter range

Sorting by Color

Once you have the filter set up, you can sort by color in just a few clicks. One quick thing to note before getting started is that it’s not always easy to return to the original sort order after sorting using filter views, so if you need to return to the original sort order, it’s a good idea to add an additional column with the original row numbers and make sure it’s part of the filter view

Here’s how to sort by color:

Step 1

Click on the Filter icon in the header of the color you want to use to sort colors. Note that in the example images all columns in a given row have the same color so any sort icon will work

Step 2

In the menu that appears, hover over the Sort By Color menu, then hover over the Fill Color or Text Color menus depending on whether you want to sort by background or text color and select a color to sort to the top from the list

Step 3

All rows with a cell of the color in the selected column will sort to the top of the list, while the remaining rows will remain in their original order

Step 4

Repeat the process as desired with as many colors as you’d like. Each time only the selected color will be affected

Step 5

To restore the original sort order, click on the filter icon in the Original Sort column and select Sort A – Z

Summary

Example Spreadsheet: Make a copy of the example spreadsheet

In this tutorial, I covered how to sort by color in Google Sheets. Want more? Check out all the Google Sheets Tutorials.