Sorts the rows of a given array or range by the values in one or more columns.

How To Use in Sheets

SORT(range, sort_column, is_ascending, [sort_column2], [is_ascending2])

External Links

How to use the SORT function in Google Sheets (Syntax & 6 Examples)

The Google Sheets SORT function allows you to sort data and return the rows in a range either in ascending or descending order. The SORT function also allows you to add multiple criteria across columns, in a similar way to the “Sort Range” functionality in the Google Sheets menu bar. The difference is that with the SORT function you can generate a new set of data while the original data remains intact. You can use it to sort data alphabetically, numerically, or even by date, and you can sort both vertically and horizontally.