简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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