Flip the orientation of a range of cells
=TRANSPOSE(array)
| Parameter | Description |
|---|---|
array |
The array or range of cells to transpose. |
When given a vertical array, TRANSPOSE returns a horizontal array:
=TRANSPOSE({"a";"b";"c"}) // returns {"a","b","c"}
To transpose the vertical range A1:A5 into a horizontal array:
=TRANSPOSE(A1:A5) // vertical to horizontal
To transpose the horizontal range A1:E1 to a vertical array:
=TRANSPOSE(A1:E1) // vertical to horizontal
In the example shown above, the formulas in I5 and F12 are:
=TRANSPOSE(B5:F6) // formula in I5
=TRANSPOSE(B12:C16) // formula in F12
TRANSPOSE can "catch" and transpose the output from another function. The formula below changes the result from XLOOKUP from a horizontal orientation
=TRANSPOSE((XLOOKUP(value,lookup_range,return_range))