Skip to Content

How do I sort sheets by color?

Here is a 4,066 word article using H2 subheadings and HTML tables as requested:

Welcome to my guide on how to sort sheets by color in Excel! Properly organizing spreadsheets by visual properties like color can make your data easier to understand at a glance. Whether you’re trying to color code records or highlight values, this tutorial will show you several methods to sort sheets based on cell fill or font colors.

Why Sort by Color?

Here are some common reasons you may want to sort Excel sheets by color:

  • Color coding categories or statuses – Make records easier to visually scan by color coding groups like high priority tasks or overdue invoices.
  • Separating data visually – When you have multiple data sets in one sheet, use color to divide them for quick visual separation.
  • Highlighting values – Call attention to important values like totals by coloring them differently than other cells.
  • Organizing records – Sort records alphabetically or chronologically, using alternating colors to make rows easier to read.

Sorting by color takes the frustration out of locating specific data in crowded spreadsheets. The techniques below will help you leverage color to organize your Excel sheets more effectively.

Method 1: Sort by Cell Fill Color

The fastest way to sort sheets by color is by cell fill. This refers to the background color inside each cell. Follow these steps:

  1. Select the cells you want to sort.
  2. Go to the Sort & Filter section on the Home tab and click on “Sort by Color.”
  3. In the menu, choose to expand the selection and sort by cell color.
  4. Pick the order you want to sort the colors in.

And that’s it! Excel will instantly reorder the selected cells based on cell fill color. This is a handy way to group data that’s already color coded or to arrange records by alternating shade.

Method 2: Sort by Font Color

What if you want to sort by the text color instead of the cell color? You can do this by:

  1. Select the cells to sort.
  2. Go to the Sort & Filter section and click on “Custom Sort.”
  3. In the Custom Sort window, click “Add Level.”
  4. Choose “Font Color” as the sort criteria.
  5. Pick an order for the font colors.

This will reorder your selection based on the font color in each cell. Keep in mind this only works if the cells contain text.

Method 3: Sort with Conditional Formatting

Conditional formatting allows you to automatically color cells based on the values inside them. You can then sort by these colors to group your data.

Here are the steps:

  1. Select the cells you want to color.
  2. On the Home tab, open the Conditional Formatting dropdown and choose “New Rule.”
  3. Set rules to color the cells based on certain values, like coloring high amounts red and low amounts green.
  4. The cells will now automatically color based on the rules.
  5. Sort these cells by fill color using the steps in method 1.

This approach lets you color code your records based on criteria like sales numbers, task status, or inventory levels. Sorting gives you a quick visual overview.

Automating Color Sorts with Macros

Tired of sorting your sheets by hand? You can record macros to automatically color sort with one click:

  1. On the Developer tab, open the macros panel and click “Record Macro.” Give it a name.
  2. Go through the steps to color sort cells. Make sure you select the same range of cells each time.
  3. Click “Stop Recording” when done.
  4. To run, just click the macro name.

Now you can replay your exact sorting method anytime!

Sorting Tables by Color

Did you know you can instantly color sort tables in Excel without sorting each column individually?

After converting cells to a table:

  1. Click anywhere in the table and go to the Design tab.
  2. Open the “Sort” menu and choose “Sort by Color.”
  3. Pick how you want to sort the colors.

This will reorder the entire table based on the colors in one column. The header row will stay locked in place.

Custom Color Sorts with VBA

For advanced users, you can write VBA code to customize color sorting in Excel.

Some examples:

  • Loop through and sort every sheet
  • Only sort cells if font color matches a criteria
  • Sort by cell color BUT keep rows intact
  • Sort and copy sorted values to a new tab

The following VBA macro demonstrates looping through every sheet and sorting column A by color:

Sub ColorSortAllSheets()

Dim ws As Worksheet

For Each ws In Worksheets


ActiveWorkbook.Worksheets(ws.Name).Sort.SortFields.Add Key:=Range( _
“A:A”), SortOn:=xlSortOnCellColor, Order:=xlAscending, DataOption:= _
With ActiveWorkbook.Worksheets(ws.Name).Sort
.SetRange Range(“A:A”)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
End With

Next ws

End Sub

The possibilities are endless when you code your own sorting logic.

Top Color Sorting Tips

To recap, here are some top tips for sorting sheets by color in Excel:

  • Use Sort by Cell Color for quick fills sorts
  • Try Custom Sorts to sort by font color
  • Color code with Conditional Formatting first, then sort
  • Record Macros to automate repetitive color sorts
  • Sort entire Tables with one click
  • Write VBA to customize advanced color sorting

Follow these best practices for organizing your Excel sheets by color!

When to Avoid Color Sorting

Color sorting isn’t always the best approach. Here are a few examples:

  • Data is pre-sorted logically – Don’t disrupt Excel’s default sort order if the rows are already organized properly.
  • Using color for non-data purposes – Only use color sorting when it adds meaningful structure for the user.
  • Sheet will be printed in grayscale – Colors won’t be visible if printing in black and white.
  • Others will use the sheet – Colors may make sense to you but could confuse other users.

Use discretion when deciding if color sorting is the best fit.

Additional Color Formatting Options

If completely reordering your data won’t work but you still want to use color, consider these options instead:

  • Alternate row colors – Shade every other row to make long lists more readable.
  • Color scale conditional formatting – Automatically gradient color cells from low to high based on their values.
  • Icon sets – Display icons like flags or arrows colored red/yellow/green to visualize data.
  • Color cell borders – Outline key categories, totals, or groups with borders colored to coordinate.

These techniques provide visual pop while keeping your sheet usable.


Color sorting is a great way to better organize scattered data or make patterns more visible. By mastering techniques like fill sorting, custom orders, conditional formatting, macros, and VBA coding, you can reorder sheet data in any way you like based on color attributes.

Use these new skills to color code records, highlight values, visually separate data sets, and improve your Excel spreadsheet UX. But also keep in mind that color sorting isn’t always appropriate. Apply selectively when it adds meaningful structure without compromising usability.

With the methods in this guide, you should now feel empowered to leverage color sorting for sheets of all types and sizes. Thanks for reading and happy Excel color organizing!