PDA

View Full Version : Copy Cells and keep Source Formatting



IRish3538
05-07-2012, 02:33 PM
Hey guys,

I'm "copying" cell contents (not using the copy function) from one workbook to another and am trying to figure out how keep the source formatting..

ActiveWorkbook.Sheets("A").Range(Destination_Cell) = _
ThisWorkbook.Sheets("B").Cells(n,1)

I loop this function and there's different number formats.. some are dates, some are $.. How can I get this to just keep whatever the format is of the cell in ThisWorkbook.

Thanks so much for your help!

Bob Phillips
05-07-2012, 02:36 PM
Try this and tell me if anything is missing

ThisWorkbook.Sheets("B").Cells(n,1).Copy ActiveWorkbook.Sheets("A").Range(Destination_Cell)

IRish3538
05-07-2012, 02:50 PM
Sorry, I forgot to mention that some of the destination cells are merged cells so the copy doesn't work.