cdevitarun

Q: 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

Close

Q: transpose columns and rows in numbers

  • All replies
  • Helpful answers

first Previous Page 6 of 7 last Next
  • by Eltham Jones,

    Eltham Jones Eltham Jones Dec 14, 2014 3:36 PM in response to ParamedicDave
    Level 1 (15 points)
    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!"...

  • by crabpaws,

    crabpaws crabpaws Dec 14, 2014 3:38 PM in response to Eltham Jones
    Level 1 (14 points)
    Mac OS X
    Dec 14, 2014 3:38 PM in response to Eltham Jones

    Well, after all these years -- yay.

  • by Jerrold Green1,

    Jerrold Green1 Jerrold Green1 Dec 14, 2014 6:49 PM in response to crabpaws
    Level 7 (30,001 points)
    Dec 14, 2014 6:49 PM in response to crabpaws

    +1

     

    Screen Shot 2014-12-14 at 9.46.22 pm.png

  • by William Johnson7,

    William Johnson7 William Johnson7 Feb 6, 2015 1:19 PM in response to SGIII
    Level 1 (4 points)
    Feb 6, 2015 1:19 PM in response to SGIII

    THANK YOU!!!!*10 That works beautifully. May the universe shine on you for your generous donation of knowledge.

  • by SGIII,

    SGIII SGIII Feb 6, 2015 2:46 PM in response to William Johnson7
    Level 6 (10,796 points)
    Mac OS X
    Feb 6, 2015 2:46 PM in response to William Johnson7

    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

  • by Rau Arbeitsschutz,

    Rau Arbeitsschutz Rau Arbeitsschutz Nov 18, 2015 8:48 AM in response to SGIII
    Level 1 (0 points)
    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

  • by SGIII,

    SGIII SGIII Nov 18, 2015 9:42 AM in response to Rau Arbeitsschutz
    Level 6 (10,796 points)
    Mac OS X
    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

  • by Duncan Parks,

    Duncan Parks Duncan Parks Mar 3, 2016 10:26 AM in response to Wayne Contello
    Level 1 (0 points)
    Mar 3, 2016 10:26 AM in response to Wayne Contello

    Thanks for a great fix! I was transposing a 130x130 matrix...so it saved a heck of a lot of time...

  • by SGIII,

    SGIII SGIII Mar 3, 2016 11:07 AM in response to Duncan Parks
    Level 6 (10,796 points)
    Mac OS X
    Mar 3, 2016 11:07 AM in response to Duncan Parks

    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

  • by oregonpete,

    oregonpete oregonpete Mar 19, 2016 4:32 PM in response to cdevitarun
    Level 1 (10 points)
    Photos for Mac
    Mar 19, 2016 4:32 PM in response to cdevitarun

    Thanks. Very elegant little script which works perfectly.

  • by Jwillette72,

    Jwillette72 Jwillette72 Mar 30, 2016 10:16 AM in response to SGIII
    Level 1 (4 points)
    Mar 30, 2016 10:16 AM in response to SGIII

    I did everything, but I keep getting this error. What did I do wrong?

    Select a range first and then try again

  • by Jwillette72,

    Jwillette72 Jwillette72 Mar 30, 2016 10:21 AM in response to SGIII
    Level 1 (4 points)
    Mar 30, 2016 10:21 AM in response to SGIII

    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

  • by SGIII,

    SGIII SGIII Mar 30, 2016 11:18 AM in response to Jwillette72
    Level 6 (10,796 points)
    Mac OS X
    Mar 30, 2016 11:18 AM in response to Jwillette72

    Glad you got it sorted out.

     

    SG

  • by beckminsterfullerene,

    beckminsterfullerene beckminsterfullerene Jun 6, 2016 1:44 PM in response to cdevitarun
    Level 1 (4 points)
    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.)

  • by beckminsterfullerene,

    beckminsterfullerene beckminsterfullerene Jun 6, 2016 2:01 PM in response to beckminsterfullerene
    Level 1 (4 points)
    Jun 6, 2016 2:01 PM in response to beckminsterfullerene

    WARNING: When pasting back in to numbers, apparently it can only handle a hundred or so columns at a time. So I had to do this piecewise. Make sure all your data is there.

first Previous Page 6 of 7 last Next