Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.