Example 1
Turn a column into a row
C2 =TRANSPOSE(A2:A5)
Result: Jan, Feb, Mar, Apr
The four-row column becomes a four-column row, spilling right from C2. Cells C2:F2 must be empty.
C2 =TRANSPOSE(A2:A5) returns Jan, Feb, Mar, Apr
Flips a range so rows become columns and columns become rows. In current Excel the result spills and stays linked to the source.
Syntax
=TRANSPOSE()
Every version of Excel, but how you enter it differs. In Excel for Microsoft 365, Excel 2021 and later, a normal formula spills into the cells it needs. In Excel 2019 and earlier, select the whole output range first and confirm with Ctrl+Shift+Enter.
Try it
Edit the formula in C2 or change the inputs. The sheet recalculates as you type.
C2 =TRANSPOSE(A2:A5) returns Jan, Feb, Mar, Apr
TRANSPOSE turns a range on its side. A column of 12 months becomes a row of 12 months, and a block with 3 rows and 5 columns becomes a block with 5 rows and 3 columns. The first row of the source becomes the first column of the result.
array is the range or array to flip. It can be a cell range, an array constant or the output of another formula, such as =TRANSPOSE(SORT(A2:A9)).
In Microsoft 365 and Excel 2021 or later, TRANSPOSE is an ordinary formula. Type it in the top-left cell where you want the result, press Enter, and the result spills into as many cells as it needs. If something is in the way, you get #SPILL!.
In Excel 2019 and earlier, TRANSPOSE has to be entered as an array formula. Select a range of exactly the flipped size (a source of 3 rows by 5 columns needs a 5-by-3 output), type the formula, and confirm with Ctrl+Shift+Enter. A range that is too small cuts off the result, and one that is too big fills the extra cells with #N/A.
The result is a live formula. When a source value changes, the transposed copy changes with it. That separates TRANSPOSE from Paste Special > Transpose, which pastes static values and does not update. Use Paste Special when you want a one-off flip you can edit freely, and TRANSPOSE when the result must follow the source.
Because the output of a spill is one formula, you can't edit or delete individual cells inside it. To change it, edit the formula in the top-left cell, or delete that cell to clear the whole result.
If a source cell is empty, the transposed cell shows 0, not a blank. The fix is to test for blanks in the source before flipping, for example =TRANSPOSE(IF(A1:A5="","",A1:A5)), which turns empty cells into empty text.
TRANSPOSE is also a building block inside other formulas. A vertical list of values can be paired with a horizontal list of weights: =SUMPRODUCT(B2:B4, TRANSPOSE(B7:D7)) multiplies each score by its weight, because both are now three items tall. It is also the usual way to feed a row to a function that expects a column, such as a lookup range.
Other functions can reshape data too. INDEX pulls one row or column out of a block, and in Microsoft 365, TOCOL and TOROW flatten a block into one column or row.
A1:A12 or A1:D3. The first row of the result is the first column of the source, and so on.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
C2 =TRANSPOSE(A2:A5)
Result: Jan, Feb, Mar, Apr
The four-row column becomes a four-column row, spilling right from C2. Cells C2:F2 must be empty.
C2 =TRANSPOSE(A2:A5) returns Jan, Feb, Mar, Apr
Example 2
E2 =TRANSPOSE(A1:C3)
Result: Region, North, South; Q1, 48200, 31750; Q2, 51400, 33100
The header row becomes the first column. The three-by-three block stays square here, but each row of the source is now a column of the result.
E2 =TRANSPOSE(A1:C3) returns Region, North, South; Q1, 48200, 31750; Q2, 51400, 33100
Example 3
C2 =TRANSPOSE(A1:A4)
Result: Jan, Feb, 0, Apr
A3 is empty, so the third result shows 0, not a blank. Use IF(A1:A4="","",A1:A4) inside TRANSPOSE to keep it blank.
C2 =TRANSPOSE(A1:A4) returns Jan, Feb, 0, Apr
Example 4
B8 =SUMPRODUCT(B2:B4,TRANSPOSE(B6:D6))
Result: 7.6
The scores run down a column and the weights run across a row. TRANSPOSE turns the weights into a column, so SUMPRODUCT can multiply them item by item: 8 x 0.5 + 6 x 0.3 + 9 x 0.2.
B8 =SUMPRODUCT(B2:B4,TRANSPOSE(B6:D6)) returns 7.6
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In F2, flip the four months in A2:A5 into a row.
Answer in F2.
#SPILL!.0. Wrap the source in IF(range="","",range) if you want blanks to stay blank.#N/A.TRANSPOSE is a formula, so the flipped copy updates when the source changes and can't be edited cell by cell. Paste Special > Transpose pastes static values and formats that you can edit freely, but it doesn't update.
Something is in the way of the area the result needs. Clear the cells to the right and below the formula, or move the formula to an area with room.
Empty source cells are returned as zero. Use `=TRANSPOSE(IF(A1:A5="","",A1:A5))` to keep them blank.
Select a range with the flipped dimensions, type the formula, and press Ctrl+Shift+Enter. A source of 3 rows by 5 columns needs an output of 5 rows by 3 columns.
Tracks take you from the basics to modelling, one graded exercise at a time.