Next Cell

Copper Contributor

Using the following to transpose data from Sheet1 to Sheet2

It's working but I need to add code to transpose 1 line down each time.

I'm new at this - thanks!

 

Sheets("Sheet2").Range("A2:M2").Value = WorksheetFunction.Transpose(Sheets("Sheet1").Range("A1:A13"))

1 Reply

@Dwayne175 

Sub transpose()

Dim j As Integer
Dim i As Integer
For i = 1 To 13
For j = 1 To 5

Sheets("Sheet2").Cells(j + 1, i).Value = Sheets("Sheet1").Cells(i, j).Value

Next j
Next i

End Sub

 

This code transposes ("Sheet1").Range("A1:A13") to ("Sheet2").Range("A2:M2") and ("Sheet1").Range("B1:B13") to ("Sheet2").Range("A3:M3") and so on. Is this what you want to do?