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 Specialdialog box, check theTransposeoption. - Click
OKto transpose the data.
Method 2: Using Transpose Function
- Select a new range of cells where you want the transposed data to appear.
- Enter the
TRANSPOSEfunction in the formula bar:=TRANSPOSE(original_range). - Press
Ctrl+Shift+Enterto enter the formula as an array formula.
Method 3: Using Power Query
- Select your data range.
- Go to the
Datatab on the ribbon. - Click on
From Table/Rangeto open Power Query Editor. - In Power Query, select the columns you want to transpose.
- Go to the
Transformtab 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+Enterto enter the formula as an array formula.
Method 5: Using VBA Macro
- Press
Alt+F11to open the VBA Editor. - Click
Insert>Moduleto 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
F5to run the macro and follow the on-screen instructions.