0
0
Google-sheetsHow-ToBeginner ยท 3 min read

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
NameScore
John95
Anna90
Mike85
Sara80
Tom75
โš ๏ธ

Common Pitfalls

Common mistakes include:

  • Using the wrong column number for sort_column.
  • Forgetting that is_ascending must 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

ParameterDescriptionExample
rangeCells to sortA2:B10
sort_columnColumn number in range to sort by1 or 2
is_ascendingTRUE for ascending, FALSE for descendingTRUE 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.