Skip to content
Guides
Sheets Mega ToolsGoogle Workspace add-on

Sort by Color in Google Sheets™

Sort rows in Google Sheets™ by cell background or text color, with an automatic or custom color order.

Sort by Color reorders the rows of your selection by the color of the first selected column. You can sort by background color or text color.



How to use Sort by Color#

  1. Select the rows on your sheet

Select the range you want to sort. The tool sorts every row in the selection, including a header row if you select it. Select the range below the header.

> Caution: The selection cannot contain merged cells. Unmerge them first.

  1. Open the tool

Open the sidebar from Extensions > Text To Table Converter > ⚡ Launch Sidebar. On the home screen, under Sheets tools, choose Sheets Mega Tools, then choose Sort by Color.

You can also use Extensions > Text To Table Converter > Sheets Mega Tools to open the Sheets Mega Tools screen directly.

  1. Set the options

Open the arrow next to Sort selection:

  • Color basis: Background color (default) or Text color
  • Order: Auto (first color seen comes first) (default) or Custom priority
  • Priority colors: three color pickers, enabled with Custom priority. Colors not in your list go after them.
  • Tie-break by full value A→Z: for rows with the same color, sorts by the full value of the first selected column
  1. Click Sort selection

A message confirms the result, for example "3 row(s) sorted by color."


How it works#

  • The color of the first column in your selection decides the order. The rest of each row moves with it.
  • The tool needs at least two rows.
  • A selection can contain up to 100,000 cells.
  • Values, formulas, notes, and formatting move with their rows.

Use Cases#

  • Group tasks by priority color
  • Sort items by status color
  • Keep hand-highlighted categories together

Note: This tool is part of Sheets Mega Tools, available only in Google Sheets™.