Sort Excel by Color: Cells, Font Colors, and Icons

Formulas & functions · Updated November 18, 2026

To sort Excel rows by color in Microsoft 365 for Windows, select your data, choose Data > Sort, select the column under Sort by, choose Cell Color under Sort On, then pick a color and On Top or On Bottom under Order. Excel moves the entire row with its values, so select the whole table—not just the colored cells—before sorting.

What sorting by color does

Sorting by color groups rows according to the appearance of cells in one chosen column. For example, if a Status column uses green fill for Complete, yellow for In progress, and red for Blocked, you can bring the red rows to the top to review them first. The names, dates, and other details in each row move with the status cell.

Excel does not decide that red means urgent or that green means finished. It treats the selected color as a sorting criterion, just as it would treat a text value or a date. You choose which color goes above or below the others. Color sorting changes the current order of the data; it does not create a live view that rearranges itself whenever a color changes.

This is useful for reviewing highlighted records, but color should not be the only place important information is stored. A text status such as Blocked or Complete is easier to filter, search, and interpret than color alone, and it is more accessible to readers who may not distinguish the colors.

Sort a table by cell fill color

  1. Select a cell in the data, or select the complete data range. Check that every column you want to keep together is included.
  2. On the ribbon, choose Data > Sort. If a Sort Warning appears because Excel thinks only part of the range is selected, choose Expand the selection.
  3. In the Sort dialog, select the column containing the fills in the Sort by list. If the first row has headings, make sure My data has headers is checked.
  4. Set Sort On to Cell Color.
  5. Under Order, select the fill color you want to prioritize, then choose On Top or On Bottom.
  6. Choose OK to apply the sort.

Suppose a worksheet has columns for Task, Owner, Due date, and Status, and Status is in column D. To show red-filled status cells first, choose Status as Sort by, Cell Color as Sort On, and the red fill with On Top as the order. Excel reorders complete task rows; it does not sort only column D.

If your data is an Excel table, select a cell in the table before opening the Sort dialog. Tables make it easier to keep related columns together and identify headers. For an ordinary range, check the selection carefully: a blank row or column can interrupt Excel’s automatic detection of the data block.

Put several colors in a chosen order

A single color sort places the selected color at the top or bottom, but it does not give every other color a meaning or a priority. If you want a defined order—for example, red first, yellow second, and green third—add sort levels in the Sort dialog.

  1. Open Data > Sort and set the first level to the relevant column, Sort On: Cell Color, and the first color On Top.
  2. Choose Add Level. Set Then by to the same column, select Cell Color, and choose the next color On Top.
  3. Add another level for each remaining color, putting the most important color first in the level list.
  4. Choose OK and inspect the result. If the order is not what you intended, reopen Sort and adjust the levels.

For example, use red on top in the first level, yellow on top in the second, and green on top in the third. Excel applies the higher-priority level first, then uses the next level to arrange the rows that were not separated by the previous one. The result is an explicitly chosen grouping, not an automatic red-yellow-green ranking built into Excel.

You can also add a secondary sort criterion, such as Due date, to order records within a color group. Put the color level first and the date level after it if color should take priority. If the date level comes first, dates take priority and color only organizes records with the same date.

Sort by font color or conditional-formatting icons

The Sort On list can also be used for other visible formatting, including Font Color and, when applicable, Conditional Formatting Icon. Choose the relevant option in the Sort dialog, then choose the font color or icon and its position. This can help when a worksheet uses colored text or icon sets rather than filled cells.

For instance, a sales report might use a red font to flag negative values. Sorting by Font Color can bring those records together without changing the underlying numbers. A performance table might use conditional-formatting arrows or traffic-light icons; sorting by the icon can group records displaying the chosen symbol.

These options depend on the formatting present in the selected sort column. If the column has no relevant font colors or icons, there may be nothing useful to select. For conditional-formatting icons, sort using the column where the icons appear, and check that the rules apply consistently to the data rows.

Use the filter menu as a quicker option

For a quick one-color sort, the filter menu on a column can be convenient. Choose Data > Filter to show filter arrows in the header row, open the arrow for the column containing the colored cells, and look for Sort by Color. Select the desired fill or font color and choose to place it at the top or bottom when that choice is offered.

The filter menu is handy for a fast review, but the Sort dialog is clearer when you need multiple color levels, a secondary sort, or more control over the full sort setup. If Sort by Color is unavailable in the filter menu, confirm that the column actually contains colors and that you opened the menu for the correct column. The desktop ribbon and menu layout can differ from Excel for the web, so use Data > Sort in the Windows desktop app when you need the full set of sort-level controls.

How color sorting handles conditional formatting

Cell colors can be applied manually with the Fill Color button, or displayed by a conditional-formatting rule. A sort by color can use colors produced by conditional formatting as well as manually applied fills. In either case, select the column whose displayed colors you want to use and choose the specific color in the sort settings.

Conditional formatting can change a cell’s appearance when its value changes, but that does not mean Excel will continuously reorder the worksheet. After values change, the displayed colors may update while the existing row order stays as it was. Run the sort again if you need the rows regrouped according to their current colors.

There is also a difference between sorting by a color and sorting by the condition behind it. If a rule colors values below a threshold red, a numeric sort by the underlying values may be more dependable when your goal is to rank the actual numbers. Color sorting is useful when the visual category itself is what you want to review.

Common problems and how to fix them

  • Only one column moved: Undo the sort immediately if the rows no longer match. Then select the complete table and repeat the sort. When Excel asks whether to expand the selection, choose Expand the selection rather than sorting only the selected column.
  • The header was sorted with the records: Open Data > Sort and check My data has headers. If your range has no header row, leave that option unchecked.
  • The color is missing from the Order choices: Confirm that you selected the column containing the color, and check whether the appearance is a fill, font color, or conditional-formatting icon. Set Sort On to the matching type.
  • Colors appear in an unexpected order: Excel does not infer a business priority from the colors. Add one sort level per color and set the desired position for each level.
  • Rows did not move after a value changed: Color sorting is not a continuously updating arrangement. Reapply the sort after the conditional formatting changes.
  • Some records seem missing or separated: Check for blank rows or columns that might split the data range, and make sure all intended records were included when you opened the Sort dialog.

Before sorting important data, it is sensible to save the workbook or make a copy. Sorting is reversible with Undo immediately after the operation, but later edits or additional actions can make it harder to return to the exact previous order. Keeping a separate copy is especially helpful when the current row order has meaning.

When another approach is better

Color sorting is convenient for a quick visual review, but explicit values are usually a better foundation for repeatable analysis. If users need to filter by status regularly, enter a status such as High, Medium, or Low in a dedicated column and sort or filter by that value. You can then use conditional formatting to color the status cells without making the color carry the information by itself.

If you want a summary of records with a certain status, use the value in the status column with Excel’s normal filter or sort tools. If the goal is to rank a numeric measure—such as sales, age, or balance—sort by that number rather than by a color applied to it. This keeps the ordering tied to the underlying data and makes the reason for the order easier to understand.

For a one-off review, however, color sorting is often the fastest choice. It works particularly well when colors have a consistent meaning across the selected rows and you want to inspect one category without changing the underlying values or formulas.

Frequently Asked Questions

Can Excel sort by color automatically when a cell changes?
No. Excel can update conditional formatting when a value changes, but the existing sort order does not automatically refresh to match the new colors. Run the sort again when you want the rows reordered.

Can I sort by more than one color?
Yes. In Data > Sort, use Add Level to set a color and position at each level. Put the color with the highest priority first, then add the other colors in the order you want them handled.

Can I sort by color without moving the entire row?
Excel’s normal sort moves the selected records according to the sort key. For a table, include the full table so each row’s values stay together. Sorting only one column can separate values from their related records, so it is usually unsafe.

Can Excel sort cells colored by conditional formatting?
Yes. Choose the column with the displayed conditional-formatting color, set Sort On to Cell Color, and select the color in the Order options. You may need to sort again after the rule changes which cells receive that color.

Can I sort by font color instead of fill color?
Yes. In the Sort dialog, choose Font Color under Sort On, then select the font color and its position. Use Cell Color instead when the color is applied as a cell fill.

Why is Sort by Color not showing?
Check that you opened the menu for the correct column and that it contains applicable color formatting. In the Sort dialog, choose the matching type—Cell Color, Font Color, or Conditional Formatting Icon—rather than looking for every kind of formatting in one option.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.