Rotate data

T

Tobias Weber

Hi,
does Excel X have built-in way to rotate data by 90°? Does anybody have
an AppleScript?

I want to turn cells

x
y
z

into

x y z
 
P

PhilD

Hi,
does Excel X have built-in way to rotate data by 90°? Does anybody have
an AppleScript?

I want to turn cells

x
y
z

into

x y z


There is a built-in function. Copy the data (vertical in your case),
and paste it somewhere. A little button-menu thing appears, where you
can pick various things. One is Transpose, which then moves the data
to the other orientation (horizontal in your case).

PhilD
 
L

little_creature

There are 2 different things. First you have your data in three rows and
want to put them into 3 colums. Then you can either use the method PhilD has
suggested or you can use *paste as special* Edit>paste>paste special>
transpose.

The second cas would be that you have all the text in one cell as xyz and
want to have it in one cell as
X
Y
Y
to do that cell and do format>cell alighnment
 
T

Tobias Weber

little_creature said:
want to put them into 3 colums. Then you can either use the method PhilD has

No "button-menu thing" appears here.
suggested or you can use *paste as special* Edit>paste>paste special>
transpose.

That works.

Thank you both!
 
C

CyberTaz

Hi Tobias -

The "button-menu thing" is called the Paste Options Button which only
appears when *copied* content is pasted, not if the content was *cut* from
within the Excel file (although it does show up regardless of copy or cut
from a different source). It appears as a little Clipboard icon at the lower
right corner of where the pasting takes place.

The feature provides more convenient access to _some_ of the options
available in the Paste Special dialog. Although it is active by default it
can be turned off in Excel>Preferences>Edit... Perhaps somewhere along the
line you cleared the checkbox if it isn't appearing in your sheets.

HTH |:>)
Bob Jones
[MVP] Office:Mac
 
T

Tobias Weber

CyberTaz said:
can be turned off in Excel>Preferences>Edit... Perhaps somewhere along the
line you cleared the checkbox if it isn't appearing in your sheets.

There is none. As mentioned in the OP I use Excel X, maybe it was added
in 2004.
 
G

gimme_this_gimme_that

It wasn't clear what kind of solution you wanted based upon the OP.
Transpose from Excel menus, VBA, Applescript ...

Anyway this example puts 1,2,3 in A1:C3 and also in A2:A4.


Sub test2()

Dim arr() As Variant
Dim b As Workbook
Dim s As Worksheet
Dim r As Range

Dim i As Long

For i = 1 To 1
ReDim Preserve arr(1 To i)
arr(i) = Array(1, 2, 3)
Next

Set b = ActiveWorkbook
Set s = b.Sheets("Sheet1")
Set r = s.Range("A1:C1")

r.Value = Application.Transpose(Application.Transpose(arr))

Set v = s.Range("A2:A4")
v.Value = Application.Transpose(arr)

End Sub
 
C

CyberTaz

Well, you may be right about that - I haven't seen Office X in about 3 years
- other than the package sitting on my bookshelf:)

Regards |:>)
Bob Jones
[MVP] Office:Mac
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top