Then we sort by name, also in ascending order.įinally, we sort by amount, this time in descending order, so I need to provide a -1.
In this example, we sort first by region, in ascending order. A dimension can be a corresponding column, a range of cells, or an array.Įach sort dimension is entered as a pair of arguments: the array to sort by, and the sort direction.įor both SORT and SORTBY functions, sort_order is 1 for ascending order, and -1 for descending order.
Now, the SORTBY function is designed to sort data by more than one dimension at the same time. The first argument, array, is the data we want to sort, in this case, all data in the range B5:E16. Our goal is to sort the data first by region, then by name, and finally by value, with larger values first. In this worksheet, we have a list of names, projects, values, and regions. In this video, we’ll look at how to sort by multiple columns with the SORT and SORTBY functions.