In this worksheet, we have a list of names, scores, and groups.
Currently, the data is not sorted.
Our goal is to sort this data by group, then by score in descending order.
Once we have a match, Ill press the TAB key to complete.
The first argument is calledarray.
This is the data we want to sort.
In this case, thats the range B5:D14.
Next, we need to enter a pair of arguments.
With the SORTBY function, you supply sort order in pairs of inputs.
Each pair has an argument for range, and an argument for sort order.
Since we want to sort by Group first, the range is D5:D14.
Forsort_order1, we use 1, because we want to sort in ascending order.
Forby_array2, Ill use the scores in C5:C14.
Forsort_order2, Ill use -1, since we want to sort in descending order.
Finally, note thatsort_orderdefaults to 1, which specifies ascending order.
This means I could remove the firstsort_orderargument.