⌨ Syntax
SORTBY(array,by_array1,[sort_order1],[by_array2,sort_order2],…)
Arguments
array
(required)
— The array or range to sort
by_array1
(required)
— The array or range to sort on
sort_order1
(optional)
— The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending.
by_array2
(optional)
— The array or range to sort on
sort_order2
(optional)
— The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending.
▶ Examples
=SORTBY(array,by_array1,[sort_order1],[by_array2,sort_order2],…)