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

Getting the Proper Type of Ellipses

Type three periods in a row, and the AutoCorrect feature in Word kicks in to exchange that sequence for a special ...

Discover More

Changing from Pirated to Permitted Software

When you install Microsoft Office, you are required to enter a product key that unlocks the software for your use. This ...

Discover More

Understanding Grayscale Images

Word allows you to easily add images to your documents. For documents intended for monochrome printers, grayscale images ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Sorting a Range of Cells

When you sort data in a worksheet, you don't need to sort everything at once. You can sort just a portion of your data by ...

Discover More

Sorting Dates and Times

One of the strong features of Excel is its ability to sort information in a worksheet. When it doesn't sort information ...

Discover More

Undoing the Effects of a Sort

Have you ever put a lot of data into a worksheet, sorted that data, and then realized you shouldn't have done so? It is ...

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.