Vertically Invert a Range

The SORT and SORTBY functions allow sorting a range based on one of the columns in the range or another range.

These functions will be used here to vertically invert a range (even when there is no "sorting helper column").


Usage Example

The goal here is to obtain, on the right, the same table but vertically inverted:

excel range invert vertically

For a column to be used as a sorting helper, it must be already sorted in ascending or descending order (e.g., a column with numbering) so that it can then be sorted in the reverse order.

In this example, the dates are unique and in ascending order, so they can be used as the sorting column.

You can then use the SORT function to sort in descending order based on this column:

=SORT(A2:B15,1,-1)
excel range vertically inverted sort invert

Example without a Sorting Helper Column

There is not always a usable column for performing a reverse sort (and it is rarely desirable to add an additional column to the table):

excel table invert vertically range

In this case, use the SORTBY function and enter the ROW function (with any of the columns in the range as an argument) to sort based on the row number:

=SORTBY(A2:B15,ROW(A2:A15),-1)
excel range vertically inverted sortby row invert
If needed, you can download the Excel file used here: invert-vertically-range.xlsx