Horizontally Flip a Range
The SORT and TRANSPOSE functions will be used here to horizontally reverse the columns of a cell range.
Example of Use
The objective is to display the same table on the right but with an inversion of the columns:

To reverse the columns, use the following formula (which will be detailed further below):
=TRANSPOSE(SORT(TRANSPOSE(A1:D15),ROW(A1:A4),0))

Explanation of this Formula
The SORT function sorts the rows of a table and not the columns, so it is necessary to start by using the TRANSPOSE function to invert rows and columns:
=TRANSPOSE(A1:D15)
From there, you can vertically invert the rows using the SORT function (see the page on vertical inversion of rows to understand its operation before proceeding).
Enter in the ROW function a range of any width of one column and with a number of rows equal to the number of columns of the range to be inverted (here, 4 columns to invert):
=SORT(TRANSPOSE(A1:D15),ROW(A1:A4),0)
The rows are now inverted.
All that remains is to invert rows and columns again using the TRANSPOSE function to get the desired result:
=TRANSPOSE(SORT(TRANSPOSE(A1:D15),ROW(A1:A4),0))


