Sorting used to have to be done in place, but the Excel SORT functions allows you to present data from one place, in another place sorted by your specifications.
Here is a simple example. This is a list of companies, in company order, there listings and market share.
What if we want to list the companies in order of market share, highest to lowest? SORT function.
We have used one formula to sort all the information in the list into Market Share order.
The anatomy of the formula is: SORT(Where the data to sort is, the column number to sort by: we want market share which is the third column of our data, a number that indicates the order you want: -1 for descending order in our example). This is the basic SORT function. You can also select an option to sort by columns rather than rows, check it out, if your data is stored that way.
This is another good example of a function that SPILLS into other cells around it. Notice the blue outline around the sorted data. The formula is only actually in cell F4 but the result of the formula spills out into the surrounding cells.