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

Accessing a Problem Shared Workbook

What are you to do is you share a workbook with others, and then suddenly the workbook won't open properly? Dealing with ...

Discover More

Changing Directories in a Macro

When a macro works with files, it often has to change between different directories on your disk drive. This is done ...

Discover More

Using Sequential Document Serial Numbers

Need to add a unique serial number to each printed copy of your document? Here's a quick way to print such numbered versions.

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Automatically Sorting as You Enter Information

When entering information into a worksheet, you may want it to always be in a correctly sorted order. Excel allows you to ...

Discover More

Sorting Dates by Month

Sorting by dates is easy, and you end up with a list that is in chronological order. However, things become a bit more ...

Discover More

Separating Cells Based on Text Color

If the font color used for the data in your worksheet is critical, you may at some time want to move cells that use 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 two more than 7?

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.