Excel VBA - Range.Copy转置粘贴 [英] Excel VBA - Range.Copy transpose paste
本文介绍了Excel VBA - Range.Copy转置粘贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PasteSpecial
的帮助菜单,但似乎无法让我的代码工作没有错误。 我要采取工作表(Sheet1)。范围(A1,A5)
并将转换粘贴到工作表(Sheet2) .Range(A1,E1)
。
最简单的方法是什么? $ b
解决方案
工作表(Sheet1)范围(A1:A5)复制
工作表(Sheet2)。Range(A1)。PasteSpecial Transpose:= True
I'm trying to something very simple, but I seem to be stuck. I am following the help menu for PasteSpecial
but I cannot seem to get my code to work without an error.
I want to take Worksheets("Sheet1").Range("A1","A5")
and paste transpose to Worksheets("Sheet2").Range("A1","E1")
.
What is the most simple way to accomplish this?
解决方案
Worksheets("Sheet1").Range("A1:A5").Copy
Worksheets("Sheet2").Range("A1").PasteSpecial Transpose:=True
这篇关于Excel VBA - Range.Copy转置粘贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文