Skip to content
DocumentTaskLab

Google Docs tasks · Tables

Sort the rows of a table in Google Docs

Written November 27, 2026

A table typed in the order items occurred to you — names, dates, amounts in no sequence — is hard to read and harder to check. Google Docs can sort a table's rows by any column, alphabetically or numerically, in either direction, without disturbing the other columns in each row. This guide sorts a table safely: header row protected, the right column chosen, and the result checked while Undo can still rescue a wrong sort.

Sort the rows by a column

Google lists sorting among the table tools in its help on how to add and edit tables: on a computer, a table's rows can be sorted by the column you choose.

  1. Save the order you have, if it means anything. Sorting replaces the current row order. If the original sequence matters — arrival order, for example — add a plain number column first and number the rows as they stand, so the original order can be restored by sorting on that column.
  2. Click in the column you want to sort by. Put the cursor in any cell of that column, in a data row. The whole rows move together; you do not need to select the table.
  3. Open the Table menu and choose the sort direction. Use Table > Sort column ascending to run from A to Z or smallest to largest, or Table > Sort column descending for the reverse.
  4. Watch what happens to the first row. If the table has a header row of column labels, confirm it stayed at the top. If the labels sorted down into the data, undo at once with Ctrl + Z (Windows) or Command + Z (Mac) and see the snags below before trying again.

Check the sorted table

  1. Read down the sorted column. Check the first few rows, the last few rows, and any values you know belong in the middle. Sorting mistakes show up at the boundaries first.
  2. Spot-check that rows stayed whole. Pick two or three rows and confirm each value still sits beside the name or item it belongs to — a sort should move complete rows, never shuffle cells between them.
  3. Look at how numbers and dates ordered themselves. Values stored as plain text can sort as text, so 100 can land before 20 and dates written in mixed formats can scatter. If the order looks wrong, make the column's entries consistent in format and sort again.
One column at a time

Docs sorts by one column per pass. For a two-level sort — by department, then by name within each department — sort by the secondary column first and the primary column second; the second sort keeps the first sort's order inside each group in most cases. Check the result row by row if the grouping matters.

End state

When it goes wrong

Related document tasks

Sources