Copy text with formatting VBA Excel

I am importing info from one sheet to another.
The FromSheet has a block of megered cells with text inside. The text is fomatted with some portions in BOLD.
The NewSheet has a similar merged cell arrangement

This Code:

newSheet(destination)=fromSheet(source)

copies text just fine, but loses BOLD formatting.
I have tried

FromSheet(source).copy newSheet(destination)

And

FromSheet(source).copy
newSheet(destination).PasteSpecial

But they both error "cannot change merged cell"

Any ideas????


 

GrizzlerAsked:
Who is Participating?
 
Rob HensonConnect With a Mentor Finance AnalystCommented:
Or select destination and clear all formatting, thus splitting the merged cells and then paste. The merged format should copy over as well.

Thanks
Rob H
0
 
Rob HensonFinance AnalystCommented:
Try doing Activesheet.Paste rather than PasteSpecial.

Thanks
Rob H
0
 
GrizzlerAuthor Commented:
A closer look at the sheets (created by someone else) revealed the source and destination were differrent sizes.... That caused the cannot change merged cell error. I went with your second suggestion and unmerged destination and used this code
impSheet.Range("C23:K28").Copy mySheet.Range("D25:L30")
Works great!
0
 
Rob HensonFinance AnalystCommented:
Glad to of help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.