5 Ways to Transpose Data in Excel (Step-by-Step)
Transposing data in Excel is a useful technique to switch rows and columns. Here are five methods to transpose data effortlessly:
Method 1: Using Paste Special
- Copy the range of data you want to transpose.
- Right-click on the cell where you want to paste the transposed data.
- Choose
Paste Special
. - In the
Paste Special
dialog box, check theTranspose
option. - Click
OK
to transpose the data.
Method 2: Using Transpose Function
- Select a new range of cells where you want the transposed data to appear.
- Enter the
TRANSPOSE
function in the formula bar:=TRANSPOSE(original_range)
. - Press
Ctrl
+Shift
+Enter
to enter the formula as an array formula.
Method 3: Using Power Query
- Select your data range.
- Go to the
Data
tab on the ribbon. - Click on
From Table/Range
to open Power Query Editor. - In Power Query, select the columns you want to transpose.
- Go to the
Transform
tab on the ribbon. - Click on
Transpose
.
Method 4: Using INDEX and SMALL Functions
- In a new range, enter
=INDEX(original_range, COLUMN(), ROW())
. - Press
Ctrl
+Shift
+Enter
to enter the formula as an array formula.
Method 5: Using VBA Macro
- Press
Alt
+F11
to open the VBA Editor. - Click
Insert
>Module
to insert a new module. - Copy and paste the following VBA code:
Sub TransposeData()
Dim rng As Range
Set rng = Application.InputBox("Select the range to transpose:", Type:=8)
rng.Copy
rng.Offset(1, rng.Columns.Count).PasteSpecial Transpose:=True
Application.CutCopyMode = False
End Sub
- Press
F5
to run the macro and follow the on-screen instructions.