简体   繁体   English

使用VBA粘贴合并的单元格

[英]Pasting merged cells using VBA

I'm trying to copy a row of data from an excel sheet and transfer that to another sheet, but the range of row data has a two column merged cell in it and I'm having trouble pasting without any errors. 我正在尝试从excel工作表复制一行数据并将其传输到另一工作表,但是行数据范围中有两列合并的单元格,粘贴时遇到了麻烦,没有任何错误。

Any tips would be very helpful, 任何提示都将非常有帮助,

For copy a merged cells, you need mention range. 对于复制合并的单元格,您需要提及范围。
Example : A9 and B9 were merged, you need use Range("A9:B9").Copy to copy the merged cell 示例:A9和B9被合并,您需要使用Range("A9:B9").Copy复制合并的单元格

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM