Google Sheets function · Array
TRANSPOSE in Google Sheets: syntax and examples
TRANSPOSE swaps the rows and columns of a range, so the first row becomes the first column. It is one formula in one cell, and the result spills into the cells around it.
Syntax
TRANSPOSE(array_or_range)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
array_or_range | range | yes | The block of cells or the array to flip. Rows become columns and columns become rows. |
Examples
The examples use this table, starting in A1:
| Region | Q1 | Q2 | Q3 |
| North | 120 | 135 | 150 |
| South | 90 | 110 | 95 |
=TRANSPOSE(A1:D3)Result:
| Region | North | South |
| Q1 | 120 | 90 |
| Q2 | 135 | 110 |
| Q3 | 150 | 95 |
A 3 by 4 table becomes 4 by 3. The result fills cells to the right and below the formula.
Run in a Google Sheet (English US locale) on .
=TRANSPOSE(A1:A3)Result:
| Region | North | South |
One column turned into one row.
Run in a Google Sheet (English US locale) on .
=TRANSPOSE(B2:D2)Result:
| 120 |
| 135 |
| 150 |
A row of quarterly numbers laid out as a column.
Run in a Google Sheet (English US locale) on .
=SORT(TRANSPOSE(B2:D2), 1, FALSE)Result:
| 150 |
| 135 |
| 120 |
Transposed values sorted in descending order, since TRANSPOSE can be nested inside other array functions.
Run in a Google Sheet (English US locale) on .
=TRANSPOSE({1, 2, 3})Result:
| 1 |
| 2 |
| 3 |
A hand-written array: three columns become three rows.
Run in a Google Sheet (English US locale) on .
Common errors
- It takes exactly one argument. A second argument, or none at all, returns #N/A.
- The result is a live view of the source. Change a source cell and the transposed cell changes too, so copy and paste values if you need a frozen copy.
- The output needs free space to the right and below the formula. Cells already filled there stop the result from showing.
Compared with Excel
Same syntax as Excel TRANSPOSE. Excel 365 spills the result as well, older Excel needed Ctrl+Shift+Enter.