Sheet Happens
Beginner

Sorting your data

5 minutes · 2 steps · free, no sign-up

A jumbled list hides the answer. Sorting puts rows in order so the leader, or the first name alphabetically, is obvious. You will rank a six-team league table by points, then list the teams alphabetically.

In this lesson you will
  • Select a block of rows to sort
  • Sort high to low and A to Z
  • Keep each row together while sorting
  • Keep the header row out of the sort
A1 fx

Click a cell and start typing. Enter edits, Tab moves right, arrows move, Delete clears.

Quick referenceSorting at a glance

Select the data rows (not the header)
The first cell you click decides the sort column
Sort A→Z   smallest first / alphabetical
Sort Z→A   largest first / reverse alphabetical

The key ideasSummary: Sorting your data

Sorting rearranges rows into order based on one column. The key rule is to select every column of your data first. If you sorted only the points, the numbers would move but the team names would stay put, and every team would end up with someone else's score.

Leave the header row out of the selection so it stays on top. This practice sheet picks the sort column from the first cell you click. Real Google Sheets works differently: you choose the column in a dialog, which is covered in the section below.

Watch out forCommon mistakes

  • Sorting one column on its own. The numbers move but the names do not, so every row quietly ends up with the wrong data. Always select all the columns that belong together.
  • Sorting the header into the data. If the header row is selected it gets sorted like any other row. Leave it out, or tell Sheets the data has a header row.
  • Numbers stored as text. Text sorts alphabetically, so "100" lands before "9". If numbers are left-aligned in their cells, they are probably text and need converting first.

Next stepTry it in the real Google Sheets

Real Google Sheets gives you more control than this practice sheet. Select your data, then choose Data → Sort range → Advanced range sorting options. Tick Data has header row, pick the column to sort by, and choose A→Z or Z→A. You can add more sort columns to break ties. Alternatively, use View → Freeze → 1 row and then right-click a column letter and choose Sort sheet A→Z; the frozen header stays on top. For sorting you can switch on and off, try Data → Create a filter.