0
votes

I am trying to copy one excel column data into another excel by using PasteSpecial function of VBA and I can able to copy the data but when there is no data in the destination right column PasteSpecial making the columns merged.Please see the image how the 'pastespecial' Pasted the data

DestSheet.Range(ColumnLetter & LastRowDest).PasteSpecial xlPasteValues

1
the structure of the state of the data sheet (how it was merged), It seems to be necessary to know the state of the sheet (whether or not it is merged) by pasting.Dy.Lee

1 Answers

0
votes

Please check if the destination cells are not merged. PasteSpecial inherently does not merge cells, so I think it might be an issue with the destination cells being already merged. In general, if the structure of merged cells is different, pasting only the value causes an error.