Skip to content
Google Sheets

SORT function in Google Sheets

Sorts the rows of a given array or range by the values in one or more columns.

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

SORT syntax and parameters

Five arguments, three required.

  • rangerangeRequired

    The data to be sorted.

  • sort_columnanyRequired

    The index of the column in range or a range outside of range containing the values by which to sort. A range specified as a sort_column must be a single column with the same number of rows as range.

  • is_ascendingbooleanRequired

    TRUE or FALSE indicating whether to sort sort_column in ascending order. FALSE sorts in descending order.

  • sort_column2anyOptional
  • is_ascending2booleanRepeating

SORT examples

Formulas you'll actually reuse.

  1. Whole table by its third column, biggest deals first (FALSE = descending):

    =SORT(A2:C200, 3, FALSE)
  2. Filter then sort — the spilled result stays live as data changes:

    =SORT(FILTER(A2:C, C2:C > 1000), 3, FALSE)

SORT in Excel

Same name — your formula ports as-is.

Try SORT in the playground

Edit the example — nothing to install.

Preloaded with the SORT formula from Example 1 — change anything and watch it respond.

Loading the editor…