← Back to level 2
Level 2Next
SORTBY
A medium dynamic array formula for sorting one range based on values from another range.
Syntax
=SORTBY(...)Step-by-step explanation
- 1Select the list or table that will be processed by the dynamic array formula.
- 2Add the filter or sorting rule so Excel knows which rows to return.
- 3Check the spilled output to make sure the visible results match the rule.
Common mistakes
Mixing up the primary range and sort range
Forgetting that the spill area must be clear
Using it when a simple SORT would be enough
Example table
A quick scenario to connect the syntax to the result.
| 12 | 18 |
| 8 | 68 |
Formula
=SORTBY(A1:B2)
Result
68
Worked example
- 1Read the sample data first so you know what the formula needs to solve.
- 2Enter =SORTBY(A1:B2) in the result cell and press Enter.
- 3Check that the output matches 68.
Practice area
Use SORTBY when the order should follow a separate score, date, or priority column.
Match against the syntax block above.