rotating a spreadsheet

A

andrew_malpuss

I need to rotate data in a spreadsheet, but not like transpose. What
I have is:

1 2 3
4 5 6
7 8 9

And I need to change it to:

7 4 1
8 5 2
9 6 3

or

3 6 9
2 5 8
1 4 7
In essence, landscape to portrait, is this possible?
 
V

Vijay Chary

I need to rotate data in a spreadsheet, but not like transpose. What
I have is:

1 2 3
4 5 6
7 8 9

And I need to change it to:

7 4 1
8 5 2
9 6 3

or

3 6 9
2 5 8
1 4 7
In essence, landscape to portrait, is this possible?

Hi,
If you have have a large volume of data, the best way to do it
would be to scan the rows and put the cell values in columns appropriately -
with a Macro.

The macro needs to be worked out.

VJ
 
G

Gary''s Student

Enter and run:

Sub spin_um()
Dim v(8)
s = Array("A1", "B1", "C1", "C2", "C3", "B3", "A3", "A2")
For i = 0 To 7
v(i) = Range(s(i)).Value
Next
For i = 0 To 7
k = i + 2
If k > 7 Then
k = k - 8
End If
Range(s(k)).Value = v(i)
Next
End Sub
 
R

Roger Govier

Hi Andrew

With your existing data in A1:C3, enter in say cell F1

=INDEX($A$1:$C$3,4-COLUMN(A1),ROW(A1))

Copy across through G1:H1
Copy F1:H1 to F2:F3
 
T

Toppers

Based on Roger's reply, for your second rotation:

=INDEX($A$1:$C$3,COLUMN(A1),4-ROW(A1))
 
Top