vbscriptexcel.application

Transpose range in excel with VBS


Hey guys need some help here . how can I transpose a range in excel with VBS? basically copy a range from one sheet then pastespecial transpose on the other sheet. thanks in advance


Solution

  • Public Sub transpose()
               Worksheets("Sheet1").Range("A1:A5").Copy
               Worksheets("Sheet2").Range("A1").PasteSpecial Transpose:=True
    End Sub
    

    Is this what you want?