Google Sheets SORT: Sort Data by Multiple Columns Ascending/Descending
SORT reorders the rows of an array or range based on values in one or more specified columns without modifying the original raw data table.
=SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, ...])Technical Overview & Engine Mechanics
Formula Comparison: SORT vs. Alternatives
Formula Parameters & Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
| range | Range | Required | The table to sort. |
| sort_column | Integer / Range | Required | The column index to sort by (1 = first col). |
| is_ascending | Boolean | Required | TRUE = Ascending (A-Z / Low to High), FALSE = Descending (Z-A / High to Low). |
Real-World Spreadsheet Examples
Explore verified operational formulas used in enterprise reporting and database workflows:
Example 1: Sort Deals by Revenue Highest First
=SORT(A2:E100, 4, FALSE)Example 2: Two-Tier Sorting (Department A-Z, then Salary High-to-Low)
=SORT(A2:D50, 2, TRUE, 4, FALSE)Example 3: Sort Filtered Results Dynamically
=SORT(FILTER(A2:D, D2:D > 5000), 4, FALSE)Example 4: Multi-Tier Sorting: Department A-Z, Deal Size Descending
=SORT(A2:E500, 2, TRUE, 4, FALSE)Example 5: Top 10 Highest Spending Accounts
=CHOOSEROWS(SORT(A2:D1000, 3, FALSE), SEQUENCE(10))Common Errors & Solutions
Performance Pro Tips
- Pass FALSE as the 3rd argument for reverse chronological sorting on timestamps.
Frequently Asked Questions: SORT
What does TRUE vs FALSE mean in SORT?
TRUE sorts ascending (A-Z, 0-9). FALSE sorts descending (Z-A, 9-0).
Can SORT handle dates accurately?
Yes. Valid dates in Google Sheets are stored as serial numbers and sort chronologically.
How do I sort by a column that is not part of the output?
SORT accepts an external range for the sort column: =SORT(A2:B100, C2:C100, FALSE).
How does SORT handle empty rows?
Empty cells are placed at the very end of the sorted output, regardless of ascending or descending order.
Can SORT organize data horizontally across columns?
By default, SORT sorts rows. To sort columns horizontally, transpose data: =TRANSPOSE(SORT(TRANSPOSE(A1:Z4), 1, TRUE)).
Related Google Sheets Formulas
QUERY
The QUERY function is Google Sheets' most versatile formula, executing a SQL-like Google Visualization API Query Language string across spreadsheet tables to filter, aggregate, group, pivot, and sort data in a single formula.
Data TransformationARRAYFORMULA
ARRAYFORMULA enables single spreadsheet formulas to output an entire matrix or column of calculated results automatically. When new rows are entered, ARRAYFORMULA calculates them instantly without requiring manual formula dragging.
Data TransformationFILTER
FILTER dynamically outputs only the rows or columns from a source range that satisfy one or more logical conditions. As source data updates, filtered results re-calculate automatically.