Google Sheets: How to Organize by Number (Sort Guide)
In this article
To organize rows in Google Sheets by a number, select the range or column containing the numbers, then choose Data > Sort sheet > Sort sheet by column A–Z (or Z–A) for a quick sort, or Data > Sort range for a multi-column sort where you pick the exact column and order. That is the whole answer: Google Sheets sorts numbers correctly when they are stored as numbers, not as text, and the sort menu is under Data on both desktop and the mobile app. The rest of this guide covers how to set it up cleanly, what to do when a column refuses to sort numerically, and the small habits that keep a sheet in order.
What You'll Need
- A Google account with access to Google Sheets (the free web version or the mobile app for Android and iPhone).
- A sheet where the numbers you want to sort are in their own column, with a header row ideally.
- Numbers stored as actual numbers, not text. If they are left-aligned in the cell, they are probably text and will sort alphabetically (1, 10, 2) instead of numerically.
- No merged cells in the range you plan to sort, since merged cells block sorting.
Step-by-Step
- Open the sheet in Google Sheets on desktop or in the mobile app. The menu labels can differ slightly by version, device and region, but the Data menu is consistent.
- Check that your numbers are real numbers. Click a cell with a number and look at the alignment. Numbers align right by default; text aligns left. If the column is left-aligned, select the column, open Format > Number > Automatic (or Format > Number > Number) to convert it. You can also use the
VALUEfunction in a helper column if the cells contain stray spaces or symbols. - Select the data range. Click the first cell of your table and drag to the last, or press Ctrl+A (Cmd+A on Mac) to select the whole sheet. Include the header row if you have one; Google Sheets detects headers and keeps them out of the sort.
- For a quick single-column sort, click any cell in the number column, then go to Data > Sort sheet > Sort sheet by column A–Z (ascending) or Z–A (descending). The entire sheet reorders around that column, so related rows stay together.
- For a controlled sort, go to Data > Sort range. In the dialog, tick “Data has header row” if your first row is labels. Choose the column that holds your numbers from the “Sort by” dropdown, then pick A–Z or Z–A. Click Sort.
- For multiple levels, in the same Sort range dialog click “Add another sort column” and choose a second column. This is useful when you want to sort by a number first and then alphabetically by name within ties.
- On mobile, select the range, tap the three-dot menu or the Data option in the toolbar, and choose Sort range. The mobile app offers the same ascending and descending choices, though the dialog is more compact.
- Verify the result. Scroll through the column and confirm the order runs 1, 2, 3 … or the reverse. If you see 1, 10, 2, the column is still text; repeat step 2.
Common Mistakes
- Sorting only one column. If you select just the number column and sort, the other columns stay put and rows no longer match. Always select the full table or use Sort sheet, which expands the selection automatically.
- Numbers stored as text. This is the most common cause of odd order. Left-aligned numbers, numbers with apostrophes in front, or numbers imported with spaces will sort as strings. Convert them with Format > Number or clean them with
TRIMandVALUE. - Merged cells. Merged cells anywhere in the range prevent sorting and usually trigger an error. Unmerge them first (Format > Merge > Unmerge).
- Hidden rows or filters. Sorting a filtered range can produce unexpected results. Clear filters first (Data > Turn off filter) and unhide rows before sorting.
- Formulas that reference fixed cells. Sorting moves cells, so formulas using absolute references may point to the wrong data afterward. Check key formulas after a sort.
Tips
- Keep a header row and tick “Data has header row” in the Sort range dialog so labels stay on top.
- Use Data > Create a filter to sort and filter without permanently rearranging the sheet; the filter arrows let you sort ascending or descending on demand.
- If you sort often, consider a helper column with
=VALUE(A2)to force numeric interpretation, then sort by that column. - Freeze the header row (View > Freeze > 1 row) so it stays visible while you scroll through sorted data.
- Before a big sort, make a copy of the sheet (File > Make a copy) so you can recover the original order if something goes wrong.
Troubleshooting
- Sort does nothing or gives an error. Check for merged cells, hidden rows, or a protected range. Unmerge, unhide, and remove protection (Data > Protected sheets and ranges) before retrying.
- Numbers sort alphabetically. Convert the column to numbers as described in step 2. If the cells contain currency symbols or commas, use Format > Number > Number to strip formatting, or clean with
VALUE. - The header row gets sorted into the data. Undo (Ctrl+Z), then redo the sort with “Data has header row” ticked in the Sort range dialog.
- Only part of the table moves. You likely selected a single column. Undo, select the whole table, and use Sort sheet or Sort range again.
- Sorting breaks formulas. Undo and check whether formulas use relative or absolute references. Consider converting formulas to values (Edit > Paste special > Values only) before sorting if the sheet is a one-time report.
Frequently Asked Questions
How do I sort a column by number without changing the rest of the sheet?
You cannot sort a single column in place without affecting other columns if the rows are related. The safe approach is to select the full table and use Data > Sort range, choosing your number column. If you truly want only that column reordered, copy it to a new sheet, sort there, and paste back.
Why does Google Sheets sort 1, 10, 2 instead of 1, 2, 10?
Those values are stored as text. Convert the column to numbers via Format > Number, or use a helper column with =VALUE(A2) and sort by that.
Can I sort by number on the mobile app?
Yes. Select the range, open the Data menu in the toolbar or the three-dot menu, and choose Sort range. The options mirror the desktop version, though the dialog is smaller.
Does sorting update formulas and references?
Sorting moves cell contents, so relative references adjust and absolute references stay fixed. Check any formulas that depend on specific cell positions after sorting, and undo if results look wrong.
How do I sort by a number and then by name?
Use Data > Sort range, set the first sort column to your number column, then click “Add another sort column” and choose the name column. This gives a primary numeric order with alphabetical ties.
What if my numbers have leading zeros, like 001, 002?
Leading zeros are dropped when a value is treated as a number. If you need to keep them, format the column as plain text (Format > Number > Plain text) and accept alphabetical sorting, or store the zeros in a separate display column while sorting on the numeric column.