Formualizer Docs

TRANSPOSE

Swaps rows and columns in an input range.

TRANSPOSE returns a spilled array whose shape is the inverse of the source shape.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=TRANSPOSE(array)

Arguments

ArgumentTypeRequiredDefault
arrayrange (range)Required—

Remarks

  • Input with shape R x C returns output shape C x R.
  • Empty input returns an empty spill.
  • Errors in source cells are preserved in transposed positions.

Examples

Turn a two-row, three-column rectangle into a three-row, two-column rectangle.

Formula =TRANSPOSE({1,2,3;4,5,6})

Expected result {1, 4; 2, 5; 3, 6}

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Turn a text column into a row.

Formula =TRANSPOSE({"A";"B";"C"})

Expected result {"A", "B", "C"}

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A single-cell array keeps the same dimensions.

Formula =TRANSPOSE({42})

Expected result 42

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

An error cannot be transposed as a rectangular array.

Formula =TRANSPOSE(1/0)

Expected result #DIV/0!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Transpose a row into a column

Formula =TRANSPOSE(A1:C1)

Input cells
ABC
1102030

Expected result {10; 20; 30}

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Transpose a 2x2 matrix

Formula =TRANSPOSE(A1:B2)

Input cells
AB
112
234

Expected result {1, 3; 2, 4}

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What happens to errors inside the source array?

TRANSPOSE preserves error values and only changes their position in the output matrix.

Does TRANSPOSE return a scalar for 1x1 inputs?

Yes. After transposition, a 1x1 result collapses to a scalar in this engine.

Implementation

Engine source

On this page