Google Sheets function
SORT function in Google Sheets
SORT in Google Sheets orders the rows of a range or array by values in one or more columns. Provide the source range, a column index or single-column range, and TRUE for ascending or FALSE for descending. Add more column and direction pairs for tie-breaking.
Source: Google Docs Editors HelpLast verified Nov 5, 2026
Syntax
=SORT(range, sort_column, is_ascending, [sort_column2], [is_ascending2, ...])Arguments
| Argument | Required | What it means |
|---|---|---|
range | Yes | The data whose rows should be sorted. |
sort_column | Yes | A column index in the range or a single-column range containing sort values. |
is_ascending | Yes | TRUE for ascending order or FALSE for descending order. |
sort_column2, is_ascending2, ... | No | Additional column and direction pairs used to break ties. |
Examples
Rank scores from high to low
| A | B | |
|---|---|---|
| 1 | Name | Score |
| 2 | Ava | 84 |
| 3 | Ben | 92 |
| 4 | Cara | 88 |
=SORT(A2:B4,2,FALSE)Result: Ben | 92; Cara | 88; Ava | 84
Column 2 supplies the sort values, and FALSE requests descending order.
Common mistakes
Using the sheet column number instead of the position inside the range.
When using an index, count columns from the left edge of the selected range.
Sorting one column without its related rows.
Include every related column in the source range so each row stays together.