Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to transpose a table (interchange rows to columns and vice versa). How to do that in iWork Numbers.

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

The only way to do this seems to be via the INDEX and TRANSPOSE functions. See: http://discussions.apple.com/thread.jspa?messageID=8799221

share|improve this answer
add comment

I wrote a simple AppleScript that does it.

tell application "Numbers"
    activate
    tell the front document
        tell the first sheet
            set original_range to selection range of first table

            set orignal_table to first table
            set number_of_columns to column count of orignal_table
            set number_of_rows to row count of orignal_table
            set trasposed_table to make new table with properties {row count:number_of_columns, column count:number_of_rows}

            repeat with i from 1 to number_of_columns
                repeat with j from 1 to number_of_rows
                    tell orignal_table
                        set original_value to the value of cell i of row j
                    end tell
                    tell trasposed_table
                        set the value of cell j of row i to original_value
                    end tell
                end repeat
            end repeat

        end tell
    end tell
end tell

Here you can find more details about it.

share|improve this answer
2  
It's worth mentioning this formula takes the cells' value meaning that if you have formulas in the cells you are transposing, only their output will be transposed. The formulas will not be. –  Nick Q. Dec 19 '12 at 0:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.