Formula to reverse order of column
Hi,
Is there a formula in smartsheet to reverse/flip the order of a column from
A
B
C
to
C
B
A
This can be done in excel using an INDEX and ROWS function:
=INDEX($A$2:$A$80,ROWS(A2:$A$80))
however it doesn't seem that SmartSheet has a ROWS function.
Thanks!
Junn
Best Answer

My suggestion would be to insert an autonumber column (called "Auto") as well as a text/number column (called "Row") with this column formula:
=MATCH(Auto@row, Auto:Auto, 0)
Then in the column where you want to order reversed you would use something along the lines of...
=INDEX([Col A]:[Col A], LARGE(Row:Row, Row@row))
Answers

Are you wanting this displayed in a separate column or is this a sorting thing?

In a separate column, i.e.,
COL A COL B
1 3
2 2
3 1

My suggestion would be to insert an autonumber column (called "Auto") as well as a text/number column (called "Row") with this column formula:
=MATCH(Auto@row, Auto:Auto, 0)
Then in the column where you want to order reversed you would use something along the lines of...
=INDEX([Col A]:[Col A], LARGE(Row:Row, Row@row))

So would that be four columns in total?
First column: The autonumber "Auto" column
Second column: The text/number "Row" column
Third column: The column with my original data
Fourth column: The column that I want the order reversed

That is correct.

This works perfectly, thanks!

Happy to help. 👍️
Help Article Resources
Categories
Check out the Formula Handbook template!