What is the SORT function in Google Sheets?

SORT reorders rows from an input range and spills the result elsewhere. Source data stays put, unlike Data > Sort range which edits the grid in place. Use SORT on dashboard tabs when lists should refresh automatically. For menu-driven one-time sorts, see the sorting glossary term.

When to use it

Use SORT for live leaderboards, alphabetized pick lists, and chart sources that must always show newest dates or highest values first.

When to skip it

Skip SORT when you only need the top N rows. SORTN may be shorter. When row order in the source must stay fixed for IDs, sort on an output tab instead.

How it works

  1. 1

    Pass the data range, including every column you want in the output.

  2. 2

    Set sort_column to the 1-based index of the key column inside that range.

  3. 3

    Set is_ascending TRUE for A-Z or low-to-high, FALSE for descending.

  4. 4

    Add more sort_column and is_ascending pairs for secondary keys when needed.

  5. 5

    Leave blank cells below and beside the formula for the spill range.

  6. 6

    Wrap FILTER inside SORT when only a subset should be ordered.

Examples in Google Sheets

Newest first

=SORT(A2:E, 4, FALSE) orders rows by column 4 descending so recent dates float to the top.

Alphabetical directory

=SORT(Contacts!A2:C, 1, TRUE) lists names A-Z without touching the source tab.

Sorted active rows

=SORT(FILTER(Data!A:F, Data!F:F="Active"), 3, TRUE) filters then sorts by due date ascending.

Build this without starting from a blank cell

Use a Better Sheets tool for SORT, then watch a walkthrough when you want the full pattern.

Better Sheets resources

Common mistakes

  • Sorting only one column in place with the menu while SORT on another tab would preserve IDs.
  • Wrong sort_column index after inserting a column left of the key.
  • Sorting text that looks like numbers, so 10 appears before 2.
  • Placing the SORT formula over cells the spill would overwrite.
  • Confusing SORT with the sorting UI glossary page about Data menu behavior.

Frequently asked questions

SORT vs Data > Sort range?
SORT is a formula that outputs a sorted copy. The menu sorts the selected range in place.
SORT vs sorting glossary term?
This page is about the SORT() function. The sorting term covers UI sorts and general row-order habits.
SORT vs SORTN?
SORT returns all rows ordered. SORTN caps how many rows return after sorting.
Multiple sort keys in SORT?
Add extra sort_column and is_ascending argument pairs for tie breaking.
SORT with headers?
Exclude header rows from the range or they sort into the data as a text row.
SORT dates?
Works when dates are real values. Text dates sort alphabetically and mislead.
SORT and FILTER together?
Nest FILTER inside SORT or sort the FILTER output range for dynamic subsets.
Does SORT break references?
Source references stay stable because SORT writes to a spill, not the original rows.

Related Tutorials

Watch how SORT works

Browse more tutorials
Search Every Function in Google Sheets

Search Every Function in Google Sheets

Built a useful tool to filter Google Sheet formulas based on keywords.
Scrape Google Maps

Scrape Google Maps

Scrape any query in Google Maps into your Google Sheets. Enter your API ...
Advanced Coding in Google Sheets for Programmers

Advanced Coding in Google Sheets for Programmers

Add a Custom Menu Create Native-like Functions Get URL and Sheet ID's vi...
5 Ways To Use Google Sheets for Advanced Project Management

5 Ways To Use Google Sheets for Advanced Project Management

Here are 5 advanced ways to manage projects inside of Google Sheets Man...
Calculate ROAS in Google Sheets

Calculate ROAS in Google Sheets

Calculate Return on Ad Spend with a formula combination. Bonus: create a...
The First Thing I Do When Starting a Google Sheet

The First Thing I Do When Starting a Google Sheet

Are you tired of the default look of your Google Sheets? In this video, ...

Related blog posts

Guides that explain SORT in more depth.

Browse the blog

Related glossary terms

Done reading about SORT?

Membership unlocks 636+ 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.