TRANSPOSE Function¶
The TRANSPOSE function in Excel is used to rotate the orientation of a range or array, converting rows to columns and columns to rows. This transforms a vertical range into a horizontal range, or vice versa.
Key Features of TRANSPOSE:¶
- Converts rows to columns and columns to rows.
- Works with ranges, arrays, and array constants.
- Produces a dynamic array result in Excel 365 and Excel 2021.
- Useful for restructuring data layouts without manual copying.
- Can be combined with other array functions for complex data transformations.
Syntax:¶
- array: The array or range to transpose. Rows become columns and columns become rows.
How TRANSPOSE Works:¶
- The function takes each row from the original array and converts it into a column.
- Similarly, each column from the original array becomes a row.
- The resulting array has dimensions swapped: an m×n array becomes an n×m array.
- The original data remains unchanged; TRANSPOSE returns a new transposed array.
- In legacy Excel versions, TRANSPOSE was entered as an array formula with Ctrl+Shift+Enter.
Examples:¶
1. Transpose a Horizontal Range to Vertical:¶
Result:
If A1:D1 contains: Apple Banana Cherry Date
The result is a vertical column:
Apple
Banana
Cherry
Date
2. Transpose a Vertical Range to Horizontal:¶
Result:
3. Transpose a 2D Array:¶
Result:
4. Transpose an Array Constant:¶
Result:
5. Transpose a Single Row to a Column:¶
Result:
6. Transpose a Single Column to a Row:¶
Result:
7. Combine with SEQUENCE for Transposed Sequences:¶
Result:
8. Use with Other Functions for Data Restructuring:¶
Result:
Notes:¶
TRANSPOSEis available in all modern versions of Excel.- In Excel 365 and Excel 2021, TRANSPOSE returns a dynamic array that spills automatically.
- In older Excel versions, you must select the output range, enter the formula, and press Ctrl+Shift+Enter.
- The output range dimensions must match the transposed dimensions (rows become columns and vice versa) in legacy mode.
- TRANSPOSE works with numbers, text, logical values, and error values.
- Empty cells in the source are preserved as empty cells in the transposed result.
Applications:¶
- Data Restructuring: Convert row-based data to column-based or vice versa.
- Report Formatting: Reorient data for different presentation requirements.
- Matrix Operations: Prepare matrices for multiplication or other matrix functions.
- Cross-tabulation: Convert data between different tabular layouts.
- Formula Compatibility: Reshape arrays for use with functions that expect a specific orientation.
Related Functions:¶
- TOCOL: Converts an array into a single column.
- TOROW: Converts an array into a single row.
- HSTACK: Horizontally combines arrays side by side.
- VSTACK: Vertically stacks arrays on top of each other.
- CHOOSECOLS: Returns specified columns from an array.
- CHOOSEROWS: Returns specified rows from an array.
- WRAPROWS: Wraps a row or column into a 2D array by rows.
- WRAPCOLS: Wraps a row or column into a 2D array by columns.
Tip: Use
TRANSPOSEwithSORTorFILTERto reorient filtered or sorted data for different reporting layouts. This is particularly useful when preparing data for charts or pivot table-like summaries.