so I need to rotate (not transpose, columns stay columns) a data range (table) by 180 degrees around its axis.
E.g.:
1 2 3
4 5 6
7 8 9
needs to become -->
9 8 7
6 5 4
3 2 1
any ideas?
so I need to rotate (not transpose, columns stay columns) a data range (table) by 180 degrees around its axis.
E.g.:
1 2 3
4 5 6
7 8 9
needs to become -->
9 8 7
6 5 4
3 2 1
any ideas?
This can be done with formulas to duplicate the table in the desired configuration in a different location, or by a macro to overwrite it in place. What do you prefer? How many rows and columns does your table have?
To do it with formulas use this formula in the squares in the duplicate table:
=INDEX($A$1:$C$3,4-ROW(),8-COLUMN())
Update the first argument to be the range for your original numbers. Change 4 to be the number of rows in the data plus 1. Change 8 to be the column where the duplicate table starts plus the number of columns in the original data.
This example is for your sample data with the duplicate table starting in E1.
Jeff
| | |·| |·| |·| |·| | |:| | |·| |·|
Read the rules
Use code tags to [code]enclose your code![/code]
Try this:
=INDEX($A$1:$C$3,ROWS($A1:$C$3),COLUMNS(A$1:$C$3))
yep, they both work, thanks!
how about rotating it 90 degrees?
like:
1 2 3
4 5 6
7 8 9
to -->
3 6 9
2 5 8
1 4 7
Try this ...
=INDEX($A$1:$C$3,COLUMNS(A$1:$A$1),ROWS($A1:$C$3))
Last edited by Phuocam; 06-14-2016 at 10:25 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks