Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Visible Cells in Sheet with Merged and Hidden Cells rtwiss Excel Discussion (Misc queries) 5 April 25th 23 09:08 AM
How to make a fluent chart for merged cells? [email protected] Excel Discussion (Misc queries) 1 January 20th 09 11:29 AM
using filter to make a merged cell correspond adjacent cells komo2kay Excel Discussion (Misc queries) 0 December 11th 08 04:11 PM
Make merged cells a feature that can be used in a shared workbook The Happy Helper Excel Worksheet Functions 2 October 29th 06 04:49 PM
Make Autofit row height work with merged cells Franketh Excel Discussion (Misc queries) 2 April 6th 05 09:13 PM


All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"