Sorts the contents of a range or array based on the values in a corresponding range or array.
Sintassi
SORTBY(array, by_array1, [sort_order1], ...)Argomenti
arrayobbligatorio
The range or array to sort.
by_array1obbligatorio
The range or array to sort by.
sort_order1facoltativo
The order to sort: 1 for ascending (default), -1 for descending.
The SORTBY function allows you to sort data by one or more criteria without changing the original source data. It is a dynamic array function that returns a spill range, meaning it automatically updates when the source data changes.
=SORTBY(A2:B5, B2:B5, -1)→Sorted listSorts the range A2:B5 based on values in B2:B5 in descending order.
Select the target cell
Click on the cell where you want the sorted data to begin.
Enter the formula
Type =SORTBY followed by the range to sort and the criteria range, then press Enter.
No, SORTBY returns a new sorted array and leaves the original data unchanged.