SORTBY
Dynamic arraysMicrosoft 365Sort one array by the values of one or more other arrays.
Syntax
SORTBY(array, by_array1, [sort_order1], [by_array2, sort_order2], …)
Examples
=SORTBY(Names, Scores, -1, Names, 1)
→ by score desc, then name asc
Related functions
More Dynamic arrays functions
Syntax follows Microsoft’s documentation. Examples are written to be pasted into a cell and checked. Argument separators may be ; in your locale. The AI explainer runs on a free community model — verify anything important.