Dear All
I have two sheets in excel workbook. "Output" and "Output_New". Both sheets have exactly same format with lots of cells merged at many places in sheets. I have to paste all values of sheet "Output" on sheet "Output_New" using vba code.
I am using following code
When i run this macro it gives following error
Run time error 1004
This operation requires the merged cells to be identically sized.
I know this error occurs bcoz the sheet have merged cells. But I don't know how to ovecome this error.
Thanks....
Regards
Brijesh
I have two sheets in excel workbook. "Output" and "Output_New". Both sheets have exactly same format with lots of cells merged at many places in sheets. I have to paste all values of sheet "Output" on sheet "Output_New" using vba code.
I am using following code
Code:
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = ThisWorkbook.Sheets("Output")
Set ws2 = ThisWorkbook.Sheets("Output_New")
ws1.Range(ws1.UsedRange.Address).Copy
ws2.Range("a1").PasteSpecial xlPasteValues
When i run this macro it gives following error
Run time error 1004
This operation requires the merged cells to be identically sized.
I know this error occurs bcoz the sheet have merged cells. But I don't know how to ovecome this error.
Thanks....
Regards
Brijesh
Last edited by a moderator: