0

I am trying to convert a row of data into columns, The code I am using below copies my selection but then past it several times over.

Sub Movefromrowtocolumn()
   Range("B3:P3").Select
    Selection.Copy
    Range("Y2").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
     :=False, Transpose:=False
End Sub

2 Answers 2

5

Is this what you are trying?

Sub Movefromrowtocolumn()
    Range("B3:P3").Copy
    Range("Y2").PasteSpecial Paste:=xlPasteValues, _
                             Operation:=xlNone, _
                             SkipBlanks:=False, _
                             Transpose:=True
End Sub

You needed to use Transpose:=True

Also INTERESTING READ

Sign up to request clarification or add additional context in comments.

Comments

0

This worked for me:

Sub Movefromrowtocolumn()
Range("A1:E1").Select
Selection.Copy
Range("F1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, transpose:=True
End Sub

Maybe the transpose:=True instead of false like you had?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.