Function reference /Array & filter

SORT

Run in a real sheet

Returns a range sorted by one or more of its columns.

SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, ...])

SORT sorts as a formula rather than as a one-off action, so the output re-sorts itself whenever the source data changes. That makes it the right tool for a live leaderboard or top-ten table.

Executed 23 Aug 2026 Google Sheets · unedited screenshot
=SORT(A2:C6, 3, FALSE) running in Google Sheets, returning Cara 1500 first, Dan 600 last
The formula sits in the formula bar and its answer sits in the grid, in one frame. Sorted by the third column of the range — sales — highest first.

Worked example

RegionRepSales
WestAna1200
EastBen900
WestCara1500
NorthDan600
EastEve1100
=SORT(A2:C6, 3, FALSE)

Returns Cara 1500 first, Dan 600 last.

Arguments

ArgumentRequiredWhat it does
range Yes The rows to sort.
sort_column Yes Which column to sort by, counted within the range.
is_ascending Yes TRUE for A→Z or small→large, FALSE for the reverse.

Gotchas

  • 01sort_column counts within the range. Sorting B2:C6 by column C means sort_column 2, not 3.
  • 02Include the header row in the range and it gets sorted along with the data. Start the range below it.
  • 03The result spills; existing content below blocks it with #REF!.