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
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.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
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
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
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.
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!"... 😁
Well, after all these years -- yay.
THANK YOU!!!!*10 That works beautifully. May the universe shine on you for your generous donation of knowledge.
Thanks for the positive feedback! Although Numbers now has the menu pick to transpose an entire table, the Automator Service with script is still handy to transpose a range of cells within a table.
SG
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
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
Thanks for a great fix! I was transposing a 130x130 matrix...so it saved a heck of a lot of time...
Hi Duncan,
This is an old thread about a 7-year-old version of Numbers no longer under development.
In the current version of Numbers all you have to do is click in the table and choose 'Transpose Rows and Columns' from the Table menu.
SG
Thanks. Very elegant little script which works perfectly.
I did everything, but I keep getting this error. What did I do wrong?
Select a range first and then try again
Can't believe I didn't see this sooner (your reply to Duncan). Super easy. Just didn't read everything like I should've. Thanks SG
Glad you got it sorted out.
SG
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