Excel function

TRANSPOSEfunction

Swaps the rows and columns of a range.

All versions
=TRANSPOSE(A1:C4)
A
B
C
D
E
F
G
H
I
1
2
3
4

Drag the corner dots to change array. Shrink the range to A1:B4 and the result becomes 2 rows by 4 columns. The result spills from F1. Try breaking it on purpose to see the errors.

Result

{"Month","Jan","Feb","Mar";"Sales",120,150,130;"Cost",80,90,85}

array
A1:C4Drag the corner dots on the table

The range whose rows and columns you want to swap.

What is the TRANSPOSE function?

=TRANSPOSE(array)

TRANSPOSE swaps the rows and columns of a range. Use it to turn a vertical table horizontal or a horizontal one vertical.

The value in row i, column j of the original goes to row j, column i of the result. The result is an array that fills several cells. Watch each value move on the sheet above.

Arguments

array
The range or array whose rows and columns you want to swap.

TRANSPOSE examples

  1. Example 1. Flip a table

    =TRANSPOSE(A1:C4)

    A 4-row, 3-column table becomes 3 rows by 4 columns.

  2. Example 2. One column into one row

    =TRANSPOSE(B2:B4)

    Laid out horizontally, like {120,150,130}.

Common mistakes

FAQ

What if the source changes?
The result changes too. To swap values only, copy and use Paste Special with "Transpose".
Blank cells?
They appear as 0.