How do you sort data in Google Sheets?
Sorting reorders rows by one or more columns. The Data > Sort range menu sorts selection in place. The SORT function returns a sorted copy that updates when inputs change. Always decide whether related columns must move together as a single row unit.
When to use it
Use sorting for leaderboards, prioritized task lists, alphabetical directories, and chart source tables that should always show highest values first.
When to skip it
Skip in-place sorting on ranges with formulas that reference row numbers elsewhere without rebuilding those links. Prefer SORT on a dedicated output tab for fragile models.
How it works
-
1
For a one-time sort, select the full data rectangle including headers, then Data > Sort range.
-
2
Check Data has header row so Sheets sorts body rows only.
-
3
{:"Add sort columns in priority order"=>"region first, then revenue descending, for example."}
-
4
For dynamic sorts, =SORT(A2:D, 3, FALSE) sorts by column 3 descending within the range.
-
5
Include a unique ID column so you can rejoin data if something sorts separately by mistake.
-
6
Combine SORT with FILTER or QUERY when you need sorted subsets, not the whole table.
Examples in Google Sheets
Sales leaderboard
SORT on a Staging tab orders reps by revenue each night; the dashboard chart reads the top ten rows.
Multi-key sort
Data menu sort: Department A-Z, then Hire date oldest first for an HR roster export.
SORT with FILTER
=SORT(FILTER(A2:E, D2:D="Active"), 5, TRUE) lists active rows by due date ascending.
Better Sheets resources
Common mistakes
-
Sorting one column while ID and amount columns stay behind, destroying row integrity.
-
Forgetting hidden rows participate in sort unless you filter them out first.
-
Using SORT on ranges with merged cells, which Sheets cannot sort reliably.
-
Expecting SORT to dedupe; it only reorders. Use UNIQUE separately if needed.
-
Sorting a column that contains ARRAYFORMULA spill errors and breaking dependent ranges.
Frequently asked questions
- SORT vs sort range menu?
- Menu sort changes the sheet in place. SORT formula creates a dynamic sorted copy.
- Sort by multiple columns in SORT()?
- Use SORTN or nest criteria with helper columns. QUERY order by handles multi-key sorts in one string.
- Keep header fixed?
- Freeze row 1 and exclude it from the sort range, or use SORT which sorts data rows only in the formula range.
- Sort dates correctly?
- Ensure dates are real date values, not text that looks like a date, before sorting.
- Sort filtered data only?
- FILTER first into a helper range, then SORT that output, or sort in place with visible cells selected carefully.
- Random sort?
- Add RAND() in a helper column, sort by it, then optionally remove the column.
- Does sort break references?
- In-place sort moves cell contents; formulas pointing at old addresses may break. Prefer SORT output tabs.
- Sort by custom list?
- Create a rank column with MATCH against a custom order list, then sort by that rank.
Related Tutorials
Watch how sorting data in Sheets works
Search Every Function in Google Sheets
Related blog posts
Guides that explain sorting data in Sheets in more depth.
How to Use Google Sheets as a Website Database
Did you know you can use Google Apps Script to turn a Google Sheet into a free, auto-syncing database for your website? This guide shows you exactly how to set it up. You’ll prepare your spreadsheet, write a few lines of code and publish your site. Don’t worry if you’re not a developer, we’ll walk you through it. Why Use Google Sheets as a Database? For small projects, Google Sheets offers many advantages over traditional databases: * Free hosting and storage * Easy to edit data without...
Read post →Extract URLs from Google Sheets
Extract url from hyperlink google sheets.Skip the Command K. This Google Sheet tutorial will make it easier for you to extract URLS from Google Sheets.
Read post →Google Sheets Locales. What are they?
Hello, Better Sheet members and non-Better Sheet members! This tutorial is about every locale listed in Google Sheets. If you live in a country that is not well represented with blog posts or someone makes a blog post about a Google Sheets issue, they create a Google Sheet formula and then you copy and paste it into your sheet and it has the wrong delimiter. How do you resolve that? I'm going to show you how you can fix that and how you can know if there's a problem. Locales. What are the...
Read post →Related terms
filters in Google Sheets
Filtering hides rows that do not match criteria without deleting data. The filter toolbar on a header row is the fastest UI path. FILTER and QUERY formulas build dynamic views that update when source data changes, which suits dashboards and reporting tabs.
Read guide →grouping rows in Sheets
Row and column grouping adds outline controls on the left or top edge so readers expand or collapse sections. It is a presentation layer: formulas still see all cells whether collapsed or not. Grouping suits budgets, project plans, and any sheet with detail rows under subtotal headers.
Read guide →SQL-style queries (QUERY)
The QUERY function runs a SQL-like statement against a range in your sheet. You SELECT columns, filter with WHERE, sort with ORDER BY, and aggregate with GROUP BY without building many helper columns. It is the closest native option to a small in-sheet database query.
Read guide →normalizing data in Sheets
Normalizing means making inconsistent inputs follow one reliable shape: same date format, trimmed text, unique keys, one fact per row, and separate columns for categories that were crammed into one field. Clean data makes VLOOKUP, QUERY, and dashboards dependable.
Read guide →Done reading about sorting data in Sheets?
Membership unlocks 600+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.