Merged Cells


Posted by Jonathan on March 06, 2001 4:53 PM

Is there a way to copy data from a report with merged cells and paste it into another report? I would like to do this with a macro but when i try i get that the copy and paste areas are not the same.

Posted by Carl B on March 06, 2001 10:05 PM

One way (and I hope someone will show me a better way) is have the macro select the are to paste to.
sheet1 cell A1 and A2 are merged, copy the data from cell A1, select Range("A1:A2") on sheet2, then paste.



Posted by David Hawley on March 06, 2001 11:26 PM


As you are pasting the merged cells in the report why not clear the merged cells in the destination report first, like:

Sub TryThis()
Sheet2.Cells.MergeCells = False
Sheet1.Range("A1:F500").Copy Sheet2.Range("A1")
End Sub


Any good ?

OzGrid Business Applications