Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Sorting by Colors.

Sorting by Colors

Written by Allen Wyatt (last updated September 2, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Excel allows you to sort the data in your worksheets by any number of attributes. One of the things that you can sort by is colors. Specifically, Excel allows you to sort by both the color of the cell and the color of the text within the cell. Follow these steps:

  1. Select the data that you want to sort or select a cell within the data you want to sort.
  2. Display the Data tab of the ribbon.
  3. Click the Sort tool. (It is in the Sort & Filter group on the Data tab of the ribbon.) Excel displays the Sort dialog box.
  4. Using the drop-down list in the Sort On column, select either Cell Color or Font Color, depending on which one you want to use in your sort. (See Figure 1.)
  5. Figure 1. The Sort dialog box when sorting by color.

  6. Using the drop-down list in the Order column, select the color by which you want to sort. (Excel allows you to sort by any color within the range you are sorting.)
  7. Using the second (right-most) drop-down list in the Order column, specify whether the color you picked in step 5 should be on top or on bottom.
  8. If you want to additionally sort by other colors, click the Add Level button and repeat steps 4 through 6 for the additional level.
  9. Click OK.

At this point your data is sorted according to the specifications you created.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7926) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Sorting by Colors.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Converting Cells to Proper Case

When storing text in a worksheet, you may have a need to change the case of that text so that the initial letter in each ...

Discover More

Using a Custom Format to Add Dashes

Want some dashes automatically added in values you display in a cell? It may be trickier to develop a custom format than ...

Discover More

Specifying a Location To Save Automatic Backup Files

Word allows you make two types of automatic backups of your documents. One is a copy of the file before you start making ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Storing Sorting Criteria

Need to do the same sorting operation over and over again? Excel doesn't provide a way to save your sorting criteria, but ...

Discover More

Sorting while Ignoring Leading Characters

Want to ignore some characters at the beginning of each cell when sorting? The easiest way is to simply create other ...

Discover More

Sorting Decimal Values

Government and industrial organizations often use a numbering system that relies upon a number both before and after a ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.