How to transpose a column into a row in ms excel

2019-08-05 18:05发布

I am trying to transpose a column into row in ms excel sheet.How can I do that? Do we have any command for doing this?Please help me.Thank you.

标签: excel
2条回答
走好不送
2楼-- · 2019-08-05 18:18

if you want to transpose with VBA macro

Sub Trnspose()
    Dim wsSrc As Worksheet
    Dim wsDst As Worksheet

    Set wsSrc = Worksheets("Sheet1")
    Set wsDst = Worksheets("Sheet2")

    wsSrc.Range("A5:A8").Copy
    wsDst.Range("B2").PasteSpecial xlPasteValues, Transpose:=True

    Application.CutCopyMode = False

End Sub
查看更多
劳资没心,怎么记你
3楼-- · 2019-08-05 18:41

Copy the data you want to transpose click on the cell you want the transposed data to start in (column A in the row?) click on the Home menu, then on the paste arrow (for more options) Then choose Transpose

Is this what you want or is there a VBA solution you are looking for?

查看更多
登录 后发表回答