Search code examples
excelvbatranspose

Vertical to Horizontal Transpose in Excel VBA


Sub transposeVBAS()

Sheets("Sheet1").Range("C2:C12").Copy
Sheets("sheet2").Range("B2").PasteSpecial Transpose:=True

End Sub

I'm facing problem going to next cell for other entries once the transpose is successful.

I know I have got similar question from past, but those codes seems be very big.


Solution

  • If you're just trying to paste to the next available row:

    With Sheets("sheet2")
        .Cells(.Rows.Count, 2).End(xlUp).offset(1).PasteSpecial Transpose:=True
    End With