SORTBY is a formula you can use to sort data by multiple columns at once or return one column of data sorted by another column.
We can return the Company “Names” in order of market share without having to return the market share column.
Anatomy of SORTBY(Array to sort: Just the company names for us, The array to sort by: the market share information in our example, a number to indicate the order: -1 for descending order is chosen here). You can supply more arrays and sort orders as well.