How to Sort Data in Google Sheets in 7 Proven Steps and Avoid Mix-Ups
Learning how to sort data in Google Sheets takes two minutes, and it turns a messy list into a clean order you can read. Select the whole table, open Data, then Sort range, then Advanced range sorting options, tick Data has header row, pick the column, choose A to Z, and click Sort. Every row moves as one unit, so each name keeps its own numbers and notes. This guide shows the seven safe steps, the multi-column sort, the SORT function, and the mistakes that scramble your rows.
Sorting moves data for real, so it is not a view trick like filtering. Learning how to sort data in Google Sheets starts with that distinction: a sort rewrites order, a filter only hides rows. A sort rewrites the order of the rows in the sheet, and everyone who opens the file sees the new order. That power makes sorting useful. The single rule that matters is to select the whole table first, never one column alone.
[SNIPPET TARGET] To sort data in Google Sheets, select the whole table with its headers, then click Data, Sort range, Advanced range sorting options. Tick Data has header row, choose the column to sort by and A to Z, then click Sort.
ANSWER BOX 1
To sort data in Google Sheets safely, select the whole table including the header row. That whole-table habit is how to sort data in Google Sheets without losing a row. Click Data, then Sort range, then Advanced range sorting options. Tick Data has header row, choose the column to sort by, pick A to Z or Z to A, and click Sort.
ANSWER BOX 2
To sort without changing the original data, use the SORT function in an empty cell. Type =SORT(A2:C50, 2, TRUE) with your own range, where 2 is the column number inside the range and TRUE means A to Z. The formula builds a live sorted copy, and the original table stays exactly as it was.
KEY TAKEAWAYS
- To sort data in Google Sheets, select the whole table first, then use Data, Sort range, Advanced range sorting options.
- Always tick Data has header row, so the header stays at the top and never gets sorted into the data.
- Never sort a single column on its own, because Sheets sorts that column alone and the rows no longer match.
- Use Add another sort column to sort by two columns at once, such as category first, then name inside each category.
- The SORT function builds a live sorted copy in a new spot, and the original table stays untouched.
Contents
- What does sorting do?
- 7 proven steps to sort safely
- Sort by more than one column
- Sort with the SORT function
- Sort sheet vs sort range
- 5 mistakes that scramble rows
- FAQ
- Final Word
What Does Sorting Do in Google Sheets?
Sorting reorders the rows of a table by the values in one column. That one-column rule is the core of learning how to sort data in Google Sheets. A to Z puts names in alphabetical order and numbers from smallest to largest. Z to A reverses that order, so the largest values or the last names come first. Dates sort from oldest to newest with A to Z, and from newest to oldest with Z to A. The order you pick should match the question you are asking of the data.
A safe sort moves each whole row as one unit. That whole-row rule is the first thing to learn when you learn how to sort data in Google Sheets. When you sort a staff list by last name, the first name, the department, and the salary in that row all travel together. That row integrity is the whole point of selecting the full table first. If you select only the last name column, Sheets sorts those names alone, and every name lands next to the wrong salary. That single-column scramble is the most common sorting disaster.
A frozen header makes sorting safer, because you can see the column labels while you pick the sort column. Our guide on how to freeze rows in Google Sheets shows how to pin row 1 before you sort. With the header frozen, the sort dialog and the table stay easy to read at the same time.
QUICK ANSWER: Will sorting break my formulas?
Sorting can move cell references, but formulas that point to cells inside the sorted rows move with them. A formula that points to a fixed cell outside the table may point to a different value after the sort.
How to Sort Data in Google Sheets in 7 Proven Steps

These seven steps sort a table safely, with the header protected and every row intact. Follow them in order to learn how to sort data in Google Sheets without scrambling a row. Follow them in order, and do not skip the header checkbox.
- Select the whole table, including the header row. Click the top-left cell of the table, such as A1, hold Shift, and click the bottom-right cell. Do not select only the column you want to sort by, because that causes the scramble.
- Click Data in the menu bar at the top of the window. The Data menu holds every sort and filter tool in Sheets.
- Point to Sort range in the Data menu. A small submenu opens with quick sort choices and the advanced option. The quick choices sort by the first column only, so pick the advanced option for control.
- Choose Advanced range sorting options from the submenu. A dialog box opens, and it names the range you selected, such as Sort range from A1 to F19. Check that the range covers the whole table before you go on.
- Tick the Data has header row checkbox. This box is often off when the dialog opens, even when row 1 holds headings and is frozen. Ticking it keeps the header at the top and out of the sort.
- Choose the column to sort by, then pick A to Z or Z to A. The Sort by dropdown lists every column in your selection by its header name. Pick the column that answers your question, and pick the direction that fits.
- Click the green Sort button to run the sort. Sheets reorders the rows at once, and every row moves as one unit. Scroll through the table to check the result, and press Ctrl and Z to undo if the order looks wrong.
How to Sort by More Than One Column
A single-column sort is often not enough, because ties need a second rule. Learning how to sort data in Google Sheets by two columns at once solves most tie problems. A sales list sorted by region still needs an order inside each region, such as the largest sale first. A class list sorted by grade still needs an order inside each grade, such as last name A to Z. A multi-level sort handles both rules in one pass, and it keeps the table readable.
Open the same advanced sort dialog from Data, then Sort range, then Advanced range sorting options. Set the first rule in the Sort by dropdown, such as Category, and set its order to A to Z. Then click Add another sort column, and a second rule appears below the first. Set the second rule, such as Name, and set its order to A to Z as well. Click Sort, and Sheets applies the first rule, then the second rule inside each group.
How to Sort With the SORT Function
The SORT function builds a sorted copy of your data in a new spot, and the original table never moves. That makes it the right tool when the original order matters, such as a log ordered by time or a list in entry order. The copy updates on its own when the source data changes, so it stays fresh without a new sort each time.
The basic syntax is =SORT(range, sort_column, is_ascending). The range is the data you want to sort, such as A2:C50, and it should not include the header row. The sort column is the column number inside the range, not the letter on the sheet, so 2 means the second column of the range. The is_ascending value is TRUE for A to Z and FALSE for Z to A. For a staff list in A2:C10, type =SORT(A2:C10, 2, TRUE) into cell E2 to sort by last name. The sorted copy spills into the cells below and to the right, so keep that area empty.
Sort Sheet vs Sort Range: Which One Wins?
Sheets offers two sort commands, and they affect different amounts of data. Knowing how to sort data in Google Sheets means choosing the right command for the size of your table. Sort sheet sorts the entire tab by one column, while Sort range sorts only the cells you selected. The right pick depends on whether the tab holds one table or several blocks of data.
| Feature | Sort sheet | Sort range |
|---|---|---|
| What it sorts | The whole tab | Only the selected range |
| Header protection | No checkbox, freezes help | Data has header row checkbox |
| Multi-column rules | No, one column only | Yes, add more columns |
| Best use | A tab with one table | A tab with several tables |
| Risk | Sorts notes outside the table | Low, limited to the range |
Choose Sort sheet when the tab holds a single table and nothing else. Right-click the column letter, then choose Sort sheet A to Z or Sort sheet Z to A. Choose Sort range when the tab holds notes, totals, or a second table that must not move. The range dialog gives you the header checkbox and the multi-column rules, so it is the safer default for most work.
Filter first when you only need part of the table sorted, because the filter hides the rows you do not need. Our guide on how to filter data in Google Sheets shows how to set up a filter and a filter view.
5 Mistakes That Scramble Your Rows

These five mistakes cause most sorting problems, and the first one causes the worst damage. Learning how to sort data in Google Sheets safely means avoiding all five of them. Read the list before your next sort, and your rows will stay matched.
- Sorting a single column on its own. Sheets sorts that column alone, with no warning, and every row comes apart. Always select the whole table first, then sort by one of its columns.
- Forgetting to tick Data has header row. The header row sorts into the data like an ordinary value, so a label such as Name lands in the middle of the names. Tick the box every time the dialog opens.
- Sorting a range that misses a column. A table sorted without its last column leaves that column behind, so the values no longer match their rows. Select from the first column to the last column before you sort.
- Sorting a sheet with blank rows inside the table. Blank rows split the range, so Sheets may sort only part of the table. Remove blank rows from the middle of the data before you sort.
- Sorting without a backup on a shared sheet. A sort rewrites the order for everyone, and a teammate may lose the order they were using. Copy the tab first, or use the SORT function for a safe copy.
How to Sort Data in Google Sheets FAQ
How do I sort data A to Z in Google Sheets?
Select the whole table with its headers, then click Data, Sort range, Advanced range sorting options. Tick Data has header row, choose the column, pick A to Z, and click Sort.
How do I sort by two columns in Google Sheets?
Open Data, then Sort range, then Advanced range sorting options. Set the first rule in the Sort by dropdown, then click Add another sort column and set the second rule.
How do I sort a column without messing up the rows?
Never select only one column of a table. Select the entire table first, then sort by the column you want using Data, then Sort range, then Advanced range sorting options.
What is the SORT function in Google Sheets?
The SORT function returns a sorted copy of a range without changing the original. Type =SORT(range, sort_column, is_ascending) in an empty cell, such as =SORT(A2:C50, 2, TRUE).
How do I sort dates in Google Sheets?
Select the table, open the advanced sort dialog, tick Data has header row, and pick the date column. Choose A to Z for oldest to newest, or Z to A for newest to oldest.
How do I sort numbers from largest to smallest?
Select the whole table, open the advanced sort dialog, and pick the number column. Choose Z to A, which puts the largest value first.
How do I undo a sort in Google Sheets?
Press Ctrl and Z on Windows, or Cmd and Z on a Mac, right after the sort. The undo restores the exact original order.
Can I sort data in the Google Sheets mobile app?
Yes, open the spreadsheet in the Sheets app and tap the letter at the top of the column to select it. Tap the top of the column again to open its menu, then tap More. Scroll down and tap SORT A-Z or SORT Z-A to sort the sheet by that column.
Why did my sort mix up my data?
The most common cause is sorting a single column instead of the whole table. Sheets sorted that column alone, so the rows no longer match.
How do I sort with a header row in Google Sheets?
Tick the Data has header row checkbox in the advanced sort dialog. The header stays at the top and never gets sorted into the data. The checkbox is often off when the dialog opens, so check it every time before you click Sort.
Can I sort data without changing the original?
Yes, use the SORT function in an empty cell to build a live sorted copy. The original table stays exactly as it was, and the copy updates when the source data changes.
What is the difference between Sort sheet and Sort range?
Sort sheet sorts the entire tab by one column, while Sort range sorts only the cells you selected. Use Sort sheet for a tab with one table, and Sort range for a tab with notes or a second table. Sort range also gives you the header checkbox and multi-column rules.
Final Word
Sorting is a simple tool with one hard rule, and learning how to sort data in Google Sheets starts with that rule: select the whole table first, and never sort a column on its own. The seven steps in this guide protect the header, keep every row intact, and give you an undo path when the result surprises you. Multi-column rules handle ties, and the SORT function keeps the original safe when the order must not change.
Once the table is sorted, it is ready to show to someone else. Our guide on how to create a chart in Google Sheets shows how to turn a sorted table into a chart. A sorted table makes a clean chart, because the bars or lines already run in an order the reader can follow.
Read more about Google Sheets on Wikipedia: https://en.wikipedia.org/wiki/Google_Sheets
