How to Use SORT in Google Sheets: Simple Guide
Use the
SORT function in Google Sheets to arrange data in ascending or descending order by specifying the range, sort column, and order. The syntax is =SORT(range, sort_column, is_ascending), where is_ascending is TRUE for ascending or FALSE for descending order.Syntax
The SORT function arranges data from a range based on one or more columns.
- range: The cells you want to sort.
- sort_column: The column number in the range to sort by.
- is_ascending: TRUE for ascending order, FALSE for descending.
plaintext
=SORT(range, sort_column, is_ascending)Example
This example sorts a list of names and scores by the score column in descending order.
google_sheets
=SORT(A2:B6, 2, FALSE)Output
Name | Score
John | 95
Anna | 90
Mike | 85
Sara | 80
Tom | 75
| Name | Score |
|---|---|
| John | 95 |
| Anna | 90 |
| Mike | 85 |
| Sara | 80 |
| Tom | 75 |
Common Pitfalls
Common mistakes include:
- Using the wrong column number for
sort_column. - Forgetting that
is_ascendingmust be TRUE or FALSE, not text. - Sorting ranges that include headers without excluding them.
Always select the data range without headers or use a separate header row.
google_sheets
=SORT(A1:B6, 2, TRUE) <em>(Wrong: includes header row)</em> =SORT(A2:B6, 2, TRUE) <em>(Right: excludes header row)</em>
Quick Reference
| Parameter | Description | Example |
|---|---|---|
| range | Cells to sort | A2:B10 |
| sort_column | Column number in range to sort by | 1 or 2 |
| is_ascending | TRUE for ascending, FALSE for descending | TRUE or FALSE |
Key Takeaways
Use SORT(range, column, TRUE/FALSE) to sort data by a specific column.
Exclude header rows from the range to avoid sorting headers.
TRUE sorts ascending; FALSE sorts descending.
Specify the correct column number relative to the selected range.
SORT returns a new sorted array without changing original data.