How to Sort Data by Cell Colour or Font Colour in Microsoft Excel

Colour coding is one of the most effective visual management techniques in spreadsheet design. Whether you highlight urgent tasks in red, completed deliverables in green, or pending approvals in yellow, visual markers immediately draw the eye. However, as spreadsheets grow to hundreds of rows, scrolling through to locate highlighted items becomes inefficient. Microsoft Excel includes built-in tools that allow you to sort rows by cell fill colour or font colour instantly.

This allows you to bubble all red critical alerts or VIP accounts straight to the top of your worksheet with zero manual reordering.

Method 1: Right-Click Quick Sort (Fastest Approach)

If you want to bring all cells matching a specific colour to the very top of your table:

  1. Locate any cell that has the highlight colour you want at the top of your list.
  2. Right-click that coloured cell.
  3. In the context menu, hover your mouse over Sort.
  4. Select Put Selected Cell Colour On Top (or Put Selected Font Colour On Top).

Excel will instantly reorganise your table, grouping all matching coloured rows at the summit whilst keeping the remaining rows beneath.

Method 2: Multi-Level Custom Sort by Colour Hierarchy

If your spreadsheet utilises multiple status colours (e.g. Red = Urgent, Amber = In Progress, Green = Done) and you want them arranged in an exact tiered hierarchy:

  1. Highlight your table or click any cell within your data range.
  2. Switch to the Data tab on the ribbon and click the large Sort icon.
  3. In the Sort dialogue box, ensure My data has headers is ticked in the upper-right corner.
  4. In the Column drop-down, select the column that contains your colour highlights.
  5. Under the Sort On drop-down menu, change “Cell Values” to Cell Colour (or Font Colour).
  6. Under the Order drop-down, click the colour swatch and choose your first priority colour (e.g. Red). Leave the positioning set to On Top.
  7. Click the Add Level button at the top left of the dialogue box.
  8. Configure the second level for the same column, set Sort On to Cell Colour, and select your second priority colour (e.g. Amber).
  9. Repeat for any additional colours, then click OK.

Excel will order your entire dataset according to your exact visual color hierarchy.

Sorting by Conditional Formatting Icons

If you use conditional formatting icon sets (such as green ticks, yellow exclamation marks, and red flags), you can sort by these symbols as well:

  • In the Sort dialogue box, select Conditional Formatting Icon under the Sort On drop-down.
  • Pick which icon symbol should display at the top or bottom of your column.

Frequently Asked Questions

Does sorting by colour disrupt data in adjacent columns?

No, provided your table has no completely empty divider columns. Excel automatically expands the selection across the entire continuous data block, ensuring each row’s data remains accurately aligned.

Can I filter by colour instead of sorting?

Yes. Click the auto-filter drop-down arrow in your header row, hover over Filter by Colour, and select the shade you wish to view. Excel will hide all other colours until cleared.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.