View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Anony Anony is offline
external usenet poster
 
Posts: 35
Default how to make merged cells on a new sheet

If you included the entire area or all of the current region, then the merged
cell should copy over. Say cells A5, A6, and A7 are merged, then you would
use this to copy the merged cell:
Range("A5").CurrentRegion.Copy
Destination:=Workbooks("Book1").Sheets("Sheet1").R ange("A1")
Hope this helps.

------
Cheers,
Anony


"clara" wrote:

Hi all,

I have to copy a portion of a sheet into another workbook's sheet, some
cells in the portion are merged and I would like to remain the same layout
on the new sheet.
this is my code:

Range("A1:A5").Copy
Destination:=Workbooks("book1").Sheets("sheet1").R ange("A1")

it only copy value and cell format, but can not merge cells on the new sheet

thank you for your help in advance

Clara
--
thank you so much for your help