LocalExcelTool
Get started

Excel TRANSPOSE function

TRANSPOSE turns a sideways table upright and vice versa. The practical case: someone sends a report with quarters across the top, and you need a tall table to pivot or to VLOOKUP against. It returns an array rather than a value, so before Excel 365 it had to be entered with Ctrl+Shift+Enter.

Lookup & reference · Available in: Excel 97; dynamic spilling from Excel 365

Syntax

TRANSPOSE(array)

What it returns The array with rows and columns swapped; it spills into neighbouring cells in Excel 365.

Arguments
arrayrequiredThe range or array to transpose.

Examples

A sideways quarterly table, turned upright

MetricQ1Q2Q3
Revenue120000138000151000
= TRANSPOSE(A1:D2)

→ 4 行 × 2 列的区域(Metric/Revenue、Q1/120000、Q2/138000、Q3/151000)

Two rows by four columns becomes four rows by two. In Excel 365 you type the formula in the top-left cell and the result spills; if the spill area is occupied you get #SPILL!, so clear it first.

Common mistakes

  • 1.Pressing Enter in Excel 2019 or earlier, which returns only the first value. Select a target range of the right shape and press Ctrl+Shift+Enter.
  • 2.An occupied spill range in Excel 365 gives #SPILL! — move the formula to open space, or use INDEX to pull single elements.
  • 3.Assuming the shape is dynamic. The values follow the source, but the spilled shape is fixed, so a source range that gains a column needs the formula re-anchored.

How to use it

  1. 1.Click the cell where the result should appear.
  2. 2.Type = then the function name, and press Tab to accept it.
  3. 3.Enter each argument separated by commas; ranges can be dragged with the mouse.
  4. 4.Press Enter. Drag the fill handle down if the same formula applies to more rows.

Frequently asked questions

What is the syntax of TRANSPOSE?

TRANSPOSE(array). What it returns: The array with rows and columns swapped; it spills into neighbouring cells in Excel 365.

Which Excel versions support TRANSPOSE?

Excel 97; dynamic spilling from Excel 365. It is available in every desktop version unless the note above says otherwise.

Why does TRANSPOSE return an error instead of a value?

Pressing Enter in Excel 2019 or earlier, which returns only the first value. Select a target range of the right shape and press Ctrl+Shift+Enter.

Related functions

More in this group

Need to get the data in first?

← All Excel formulas