FUNCTION CATALOGUE / LOOKUP & REFERENCE
SORTBY Excel function
Sorts an array based on another array.
Correct sentence to use
Sort [range] by [sort range], [ascending or descending].
Modify this query in PlainFormula →Example formula
=SORTBY(A2:D100,D2:D100,-1)
Sorts one array using another range.
Syntax
SORTBY(array, by_array1, [sort_order1], …)
Argument signature: array, by_array1, [sort_order1], …
Availability note
Available in supported Microsoft 365 / newer Excel versions; verify the exact release and platform.