Lookup & reference function

TRANSPOSE function

Flips a range so its rows become columns and its columns become rows.

Available in All versions of Excel. In Microsoft 365 and Excel 2021+ it spills automatically; in older versions select the output range and confirm with Ctrl+Shift+Enter.

In every Excel versionWorks in Google Sheets

Syntax

TRANSPOSE(array)
ArgumentWhat it means
arrayRequiredThe range or array to flip.

Returns: The same values with rows and columns swapped. A range of R rows and C columns becomes C rows and R columns.

How TRANSPOSE works

TRANSPOSE turns a table on its side: what ran down the page now runs across, and vice versa. It is the formula version of Paste Special > Transpose, with one big difference - the result stays linked to the source, so when a value in the original changes the flipped copy changes too.

In Microsoft 365 and Excel 2021 or later you type the formula in one cell and the result spills into the right shape automatically. In Excel 2019 and earlier it is a legacy array formula: you must first select an output range of exactly the flipped size (for example 2 rows by 4 columns for a 4-by-2 source), type the formula and press Ctrl+Shift+Enter. Empty source cells come back as 0, and formatting is not copied.

Beyond reshaping reports, TRANSPOSE is needed in matrix maths with MMULT, where one of the ranges must be turned around before the two can be multiplied.

Examples

1Turn a vertical table horizontal

D1fx=TRANSPOSE(A1:B4)
ABCDEFG
1MonthSalesMonthJanFebMar
2Jan8200Sales8200915010400
3Feb9150
4Mar10400

A 4-row by 2-column table becomes 2 rows by 4 columns, spilling into D1:G2.

2Headers into a column

G1fx=TRANSPOSE(B1:E1)
ABCDEFG
1RegionQ1Q2Q3Q4Q1
2North12500142001390016100Q2
3South9800104001125012030Q3
4East7600815089009420Q4

The quarter headings that run across row 1 are listed downwards, ready to use as row labels in another report.

3Invoice total with matrix multiplication

E2fx=MMULT(TRANSPOSE(B2:B4), C2:C4)
ABCDE
1ItemQtyUnit price
2Paper312.5117.5
3Toner54
4Folders230

Result: 117.5

MMULT needs a row times a column, so the quantities are transposed into a row. The result is 3x12.5 + 5x4 + 2x30 = 117.5 (the same as SUMPRODUCT).

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#SPILL!The cells needed for the flipped result are not empty.Clear the output area or move the formula.
#VALUE!In older Excel the formula was entered with plain Enter, or the selected output range is the wrong size.Select the correctly sized range and press Ctrl+Shift+Enter.

Tips

  • Blank source cells appear as 0; use =TRANSPOSE(IF(A1:B4="", "", A1:B4)) to keep them blank.
  • If you only need a one-off flipped copy with formatting, Paste Special > Transpose is simpler.
  • TOROW and TOCOL flatten a range into a single row or column instead of flipping it.

Questions

Why does TRANSPOSE show only one value in Excel 2016?

Older versions need a legacy array formula: select the whole output range first, type the formula, then press Ctrl+Shift+Enter.

Does TRANSPOSE keep the link to the original data?

Yes. Unlike Paste Special > Transpose, the formula updates when the source changes.

Google Sheets

TRANSPOSE also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

TRANSPOSE in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechTRANSPOZICE
DanishTRANSPONER
DutchTRANSPONEREN
FinnishTRANSPONOI
GermanMTRANS
HungarianTRANSZPONÁLÁS
ItalianMATR.TRASPOSTA
Norwegian (Bokmål)TRANSPONER
PolishTRANSPONUJ
Portuguese (Brazil)TRANSPOR
Portuguese (Portugal)TRANSPOR
RussianТРАНСП
SpanishTRANSPONER
SwedishTRANSPONERA
TurkishDEVRİK_DÖNÜŞÜM

Recipes that use TRANSPOSE