Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to make merged cells on a new sheet
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to make merged cells on a new sheet
Hi Anony,
My sheet is not organized in different region, it is more like a form providind many cells for user input data. Anyway, thank you for your help Clara "Anony" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Visible Cells in Sheet with Merged and Hidden Cells | Excel Discussion (Misc queries) | |||
How to make a fluent chart for merged cells? | Excel Discussion (Misc queries) | |||
using filter to make a merged cell correspond adjacent cells | Excel Discussion (Misc queries) | |||
Make merged cells a feature that can be used in a shared workbook | Excel Worksheet Functions | |||
Make Autofit row height work with merged cells | Excel Discussion (Misc queries) |