Is your list a mess and you need it in order, fast? Google Sheets can sort your data in two clicks. In this guide you will learn three ways to sort, from the quickest to the smartest:
- Method 1 – sort the whole sheet by one column (and keep the header on top),
- Method 2 – sort a range by several columns at once,
- Method 3 – the
SORTfunction, which creates a sorted copy and leaves your original data untouched.
In the examples we use a small product list with four columns: Product, Category, Price and Units sold. The steps are the same in any browser on Windows, Mac or Chromebook.
Method 1: Sort the whole sheet by one column
This is the fastest way. The only thing to watch out for is the header row – if you do not freeze it, Google Sheets will sort it together with your data.
Step 1. Freeze the header row
Open the View menu at the top of the screen.

Point to Freeze and choose 1 row. A thick grey line appears under row 1 – the header is now locked in place.

Step 2. Right-click the column letter and sort A to Z
Right-click the letter of the column you want to sort by – for example A (Product). In the menu, choose Sort sheet A to Z.

The products are now in alphabetical order, and the header stayed at the top.

Step 3. Sort a number column from largest to smallest
Numbers work the same way. Right-click column D (Units sold) and choose Sort sheet Z to A – this means largest to smallest.

The best sellers are now at the top. Each row moves as a whole, so prices and categories always stay with the right product.

Method 2: Sort a range by several columns
Use this when one column is not enough – for example, to group products by category and then show the most expensive product first inside every group.
Step 1. Select your table including the header
Click the first cell of your table and drag to the last one (here A1:D13), header included.

Step 2. Open Data → Sort range → Advanced range sorting options
Open the Data menu, point to Sort range and click Advanced range sorting options.

Step 3. Tick “Data has header row”
In the Sort range window, tick Data has header row. Thanks to this, the headers stay out of the sort and you can choose columns by their names.

Step 4. Choose the first sort column
In Sort by, choose Category and leave A to Z.

Step 5. Add a second sort column
Click Add another sort column. In the new then by row, choose Price…

…and set it to Z to A, so the highest price comes first.

Step 6. Click Sort
Click the green Sort button.

The rows are now grouped by category, and inside every group the most expensive product is first.

Method 3: The SORT function (a sorted copy that updates itself)
The SORT function does not touch your original table. It builds a sorted copy next to it – and the copy updates automatically whenever your data changes.
Step 1. Click an empty cell
Click an empty cell where the sorted copy should start, for example F2.

Step 2. Type the formula
Type the formula and press Enter:
=SORT(A2:D13, 4, FALSE)
A2:D13– the data to sort (without the header),4– the number of the column to sort by (4 = Units sold),FALSE– descending order (largest first); useTRUEfor ascending.
Note: in some regions (for example most of Europe) Google Sheets uses semicolons instead of commas: =SORT(A2:D13; 4; FALSE). The file in the screenshots uses semicolons.

Step 3. Check the result
The sorted copy appears next to your data, with the best sellers at the top.

Now change a value in the original table – here we changed the units sold for Monitor from 42 to 400. Monitor immediately jumps to the top of the copy. You never have to sort again.

Tips and troubleshooting
- Sorted by mistake? Press Ctrl + Z (Cmd + Z on Mac) right away, or restore an older version in File → Version history.
- Sorting is blocked? Merged cells can stop sorting – unmerge them first (Format → Merge cells → Unmerge).
- Numbers sort in a strange order (1, 10, 2…)? They are probably stored as text. Select the column and choose Format → Number → Number.
- Sharing the file? Use Data → Create filter view and sort inside it – others will not see your sort order.
Summary
- Whole sheet: View → Freeze → 1 row, then right-click a column letter → Sort sheet A to Z / Z to A.
- Several columns: select the table → Data → Sort range → Advanced range sorting options → tick “Data has header row” → add sort columns → Sort.
- Sorted copy:
=SORT(range, column_number, TRUE/FALSE)– updates automatically.
Frequently Asked Questions
Why did my header row get sorted with the data?
Freeze the first row (View → Freeze → 1 row) or tick “Data has header row” in Data → Sort range → Advanced range sorting options.
Can I undo a sort in Google Sheets?
Yes. Press Ctrl + Z (Cmd + Z on Mac) right after sorting, or restore an earlier version in File → Version history.
How do I sort without changing what my collaborators see?
Create a filter view (Data → Create filter view) and sort inside it. Only you see that sort order.
How do I sort by two columns in Google Sheets?
Select the table, open Data → Sort range → Advanced range sorting options, tick “Data has header row”, choose the first column, click “Add another sort column”, choose the second column and click Sort.
Does the SORT function update automatically?
Yes. The result of =SORT(range, column, TRUE/FALSE) recalculates whenever the source data changes.