- Make a backup of your workbook.
- Open your workbook and ALT+F11
- Locate your Workbook name in Project Explorer Window
- Right click on your workbook name > Insert > Module
- Copy paste the Macro code given
- Go back to your Workbook and ALT+F8 to display Macro Window
- Run your Macro from here
- Delete you Macro if the Macro was needed to be run only once.
- Otherwise save your file as .xlsm if you intend to reuse Macro again.
'*** Macro Starts
Sub TransposeCopy()
Dim Ws As Worksheet, Ws2 As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
On Error Resume Next
Worksheets("#TempSheet#").Delete
On Error GoTo 0
Worksheets.Add.Name = "#TempSheet#"
Set Ws2 = Worksheets("#TempSheet#")
For Each Ws In Worksheets
If Ws.Name <> "#TempSheet#" Then
Ws2.Cells.Clear
Ws.UsedRange.Copy
Ws2.Range("A1").PasteSpecial Transpose:=True
Ws.Cells.Clear
Ws2.UsedRange.Copy Ws.Range("A1")
End If
Next Ws
Ws2.Delete
Application.CutCopyMode = False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub