📋 GS Sort Sheet Guide
📩 1. Formula Name + Syntax
Function: SORT
Syntax:
=SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2], ...)
📩 2. What it does
Sorts the rows of a range based on the values in one or more columns.
📄3. Use Case / Scenario
Imagine youβre managing a class grade sheet and want to automatically sort students by their marks in descending order. The SORT function helps you do this dynamically, without changing the original data.
🧪4. Interactive Example
Assume the following data is in cells A1:B5:
Name | Score --------|------- Alice | 85 Bob | 92 Charlie | 78 David | 90
Formula:
=SORT(A2:B5, 2, FALSE)
Result:
Bob | 92 David | 90 Alice | 85 Charlie | 78
🛠️ 5. Real-Life Applications
- Sorting sales data by revenue.
- Ranking students by test scores.
- Ordering project tasks by deadline.
- Filtering customer support tickets by priority.
⚠️6. Common Errors + Fixes
- #REF! Error: Happens if the
rangeincludes header but sort column refers to a row beyond the range. Fix: Exclude header or adjust the range. - #VALUE! Error: Caused by non-numeric sort index or incorrect sort direction values. Fix: Ensure you use
TRUE/FALSEor1/0properly. - Sorting Not Applied: Ensure the
sort_columnnumber matches a valid column within the selected range.
🧠 7. Bonus Tips
π‘ Combine with FILTER to sort only filtered results
π‘ You can sort by multiple columns for hierarchical sorting
π‘ Use named ranges for cleaner formulas
π‘ Pair with QUERY for powerful data handling