SORTBY function

SORTBY is another of the new dynamic array functions that, unlike the SORT function, arrange data within arrays based on other given arrays in ascending or descending order. The application of this function is that you can sort the given range first by the criteria in one column and then by those in another. Let’s see how this works!

Syntax of SORTBY function:

SORTBY (<range>,<based on array>,[<order>],[<based on array>,[<order>]], …)

If you enter a formula:

=SORTBY(A2:C13,B2:B13,1,A2:A13,1)

sorting of the range A2: C13 will be done first on the basis of column B, in ascending order, and then on the basis of column A, also in ascending order.