Going Stellar

Home/Google Sheets reference

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

ArgumentTypeRequiredWhat it does
array_or_rangerangeyesThe block of cells or the array to flip. Rows become columns and columns become rows.

Examples

The examples use this table, starting in A1:

RegionQ1Q2Q3
North120135150
South9011095
=TRANSPOSE(A1:D3)

Result:

RegionNorthSouth
Q112090
Q2135110
Q315095

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:

RegionNorthSouth

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.

Sources

  1. TRANSPOSE (Docs Editors Help)

Markdown version · All functions