Excel - Transpose Function



Transpose Function

The Excel TRANSPOSE function transforms a horizontal range of cells or vice versa. It is used to shift a cell range's horizontal and vertical orientations. Depending on the specific criteria, you can quickly transpose rows to columns or columns to rows using the TRANSPOSE function. The alternative way to transpose the dataset is to use either the Power Query Tool or the keyboard shortcut "Alt+ H+V+T".

Compatibility

This advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac 
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the TRANSPOSE function is as follows −

=TRANSPOSE(array)

Press CTRL+SHIFT+ENTER after writing the function in Excel. As this function returns an array of values, it must be entered as an Array Formula.

Arguments

You can use the following arguments with the TRANSPOSE function −

Argument Description Required/ Optional
Array

It specifies the cell range or array where the transpose function is applied.

An array's transpose is generated by utilizing the array's first row of the array transformed into the resulting array's first column, the array's second row into the resulting array's second column, and so on.

Required

Transpose in Excel Keyboard Shortcut

Various steps are written below for using the Excel keyboard shortcut to transpose the values in the array.

  • Select the range of cells in a worksheet.
  • Press the "Ctrl+ C" to copy the data.
  • Select the designated range of the cell.
  • And then press the "Alt+H+V+T" to transpose the data.

How to use the TRANSPOSE Function in Excel?

As the result is an Array, you need to input this function as an Array formula −

Step 1 − First, choose the cell range to be transposed.

Step 2 − After that, highlight the range of cells for the function result.

Step 3 − Type the =TRANSPOSE(range of cells) in the formula bar.

Step 4 − Press CTRL+SHIFT+Enter.

Excel surrounds the formula with braces ({ }). You can observe this in the formula bar. It does that automatically, and you cannot enter them yourself. If you do, the formula will not work because Excel treats the braces as text, and it cannot calculate text. Hence, make sure you press Ctrl+Shift+Enter.

Examples of TRANSPOSE Function

Practice the following examples to learn the use of the TRANSPOSE function in Excel.

Example 1: What does the Transpose Function do in Excel?

Rearranging the existing data and shifting a single row into multiple columns using the TRANSPOSE function in Excel.

Solution

Deliberate a new Excel worksheet, select the range of the cells, and write the formula =TRANSPSOE(B2:F2) in the formula bar.

What does Transpose Function do in Excel1

After that, press the "Ctrl+Shift+Enter" to populate the resulting array of values vertically.

What does Transpose Function do in Excel2

Example 2: How to Convert Rows into Columns in Excel(Transpose Data)

In this example, we apply the TRANSPOSE function to convert the row data into column data, which means shifting the orientation of the dataset to a worksheet.

Step 1 − First, consider the sample dataset, which consists of three columns: Item, Cost, and Units sold.

Convert Rows into Columns in Excel1

Step 2 − After that, place the cursor on the B8 cell, double-click on it, and write the formula =TRANSPOSE(B2:D5).

Convert Rows into Columns in Excel2

After pressing the Enter tab, the row heading becomes the column heading and vice versa.

Convert Rows into Columns in Excel

Download Practice Sheet

You can download and use the sample data sheet to practice the Transpose function.

Advertisements