Copy Excel data from columns to rows with VBA

后端 未结 6 1150
梦如初夏
梦如初夏 2021-01-21 20:16

I have a little experience with VBA, and I would really appreciate any help with this issue. In a basic sense, I need to convert 2 columns of data in sheet 1 to rows of data in

6条回答
  •  忘掉有多难
    2021-01-21 20:53

    Try this code:

    Dim X() As Variant
    Dim Y() As Variant
    X = ActiveSheet.Range("YourRange").Value
    Y = Application.WorksheetFunction.Transpose(X)
    

    Also check out this link: Transpose a range in VBA

提交回复
热议问题