0

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.

1 Answer 1

2

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)
Sign up to request clarification or add additional context in comments.

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.