You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

transpose columns and rows in numbers

I need to transpose columns and rows in Numbers and I do not want to write script to do it. Is there an easier way?

MacBook Pro, iOS 6.1.4, iWork - Numbers

Posted on Jul 29, 2013 11:10 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 29, 2013 12:51 PM

CD,


There is a TRANSPOSE function, but it's not too useful in my experience, since you have to use INDEX to read the result out of internal memory. Below are two examples, the first using TRANSPOSE and INDEX and the second using only INDEX, but this time reading the input table directly rather than via the transpose function. Note that skipping the transpose function requires that you reverse the Row and Column arguments.


In case the graphic is difficult to read, the first expression is:


=INDEX(TRANSPOSE(INDIRECT("Input")), ROW(), COLUMN())


and the second expression is:


=INDEX(Input, COLUMN(), ROW()).


Jerry

User uploaded file

97 replies

Dec 14, 2014 7:22 AM in response to cdevitarun

I too often need a transpose function to rearrange data supplied by outside vendors, e.g. Gas & Electric Company. Darned if I didn't find it in Numbers!!!


Using Numbers version 3.5, select your dataset, then go to: Table>Transpose Rows & Columns.

This turned my whole "vertical" table into a "horizontal" table, and I then had to cut/paste the columns I wanted to stack to get my final result, but this was far, far easier for my simple brain than using INDEX and TRANSPOSE functions.

Dec 14, 2014 3:36 PM in response to ParamedicDave

Yep, after several years of ignoring all the Mac users who were telling them "YES! we do want a transpose function" and Apple making lame excuses because they stupidly forgot to include it (but will never admit to the fact that they got something wrong), they have finally given us the function that we have been asking for all these years.


And guess what? Now it's a "Great New Feature!"... 😁

Nov 18, 2015 8:48 AM in response to SGIII

Hello SG III


still using numbers (2.0.3) and your transpose script.


So is it possible with you script to transpose the formular of the cells and not the values. For example: "='Tabelle 1-1-1' :: B2"


Thanks for your answer


PS


- Transpose - select range, run, paste transposed values where wanted

--SGIII 2014.05,v2 and 3 https://discussions.apple.com/thread/6237667?tstart=0

try

tell application "Numbers" to tell front document to tell (first sheet whose every table's selection range's class contains range)

set selected_table to first table whose class of selection range is range

tell selected_table

tell the selection range

set first_col to address of its first column

set last_col to address of its last column

set first_row to address of its first row

set last_row to address of its last row

end tell

set str to ""

repeat with i from first_col to last_col

repeat with j from first_row to last_row

set str to str & (value of cell j of column i of selected_table) & tab

end repeat

set str to str & return -- add line return after row

end repeat

end tell

end tell

set the clipboard to str

display notification "Ready to paste transposed values" with title "Numbers"

on error

display dialog "Select a range first and then try again"

end try

--end of script

TT

Nov 18, 2015 9:42 AM in response to Rau Arbeitsschutz

Rau Arbeitsschutz wrote:


still using numbers (2.0.3) and your transpose script.


So is it possible with you script to transpose the formular of the cells and not the values. For example: "='Tabelle 1-1-1' :: B2"



Hi Rau,


It is possible. I understand one of Yvan Koenig's scripts does this in Numbers 2. But it is too complicated for me. Recommend moving to Numbers 3.


SG

Jun 6, 2016 1:44 PM in response to cdevitarun

Here's the easiest way yet - just do it on a google spreadsheet.


As long as you have a google or gmail account this works.


Go to docs.google.com. Click the menu button and open a new spreadsheet.


Right click on a cell. Paste special -> paste transpose



that will work, now copy and paste back into numbers.



(Also BTW I tried to do that "services" thing to add the function to Numbers, but it didnt work.)

transpose columns and rows in numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.