Examples for the excel sort formula
Copy these examples into a spreadsheet and adjust the ranges for your own data.
SORT syntax pattern
=SORT(array, [sort_index], [sort_order], [by_column])Use this SORT pattern as the starting point for your spreadsheet formula.
SORT in a worksheet
=SORT(array, [sort_index], [sort_order], [by_column])Sorts an array of values.
When to use SORT
Use SORT when you need to sort an array of values.
- Filter, sort, deduplicate, and combine spreadsheet arrays.
- Build dynamic formula outputs from ranges.
How SORT works in Quadratic
In Quadratic, SORT follows the syntax SORT(array, [sort_index], [sort_order], [by_column]). The function works inside Quadratic formulas and can be combined with spreadsheet ranges, tables, and other formulas.
Common SORT mistakes
Most SORT issues come from mismatched argument types, ranges that do not cover the intended data, or optional parameters being omitted when the default behavior is not what you expected.
- Check each required parameter before copying the formula across a sheet.
- Confirm that ranges line up with the rows or columns you intend to analyze.
- Use Quadratic AI to explain or debug the formula when the result looks wrong.