Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have an XLS for which I need to A1:H1 to say A1:A7. I can achieve this by using the transpose function in copy. However I need to do this as part of VBA script. I don't seem to find any equivalent function.
Same, basically.
You can use Copy:
source_range.Copy dest_range.PasteSpecial Transpose:=true application.cutcopymode = false
Or you can avoid using it (if you only need raw values):
dest_range.value = application.worksheetfunction.transpose(source_range.value)
Add a comment
Required, but never shown
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.
Explore related questions
See similar questions with these tags.