ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Duplicating a cell (EXACTLY) (https://www.excelbanter.com/excel-programming/317935-duplicating-cell-exactly.html)

Marty

Duplicating a cell (EXACTLY)
 
Hi all:

I'm using Excel 2003. I need to know how to duplicate a cell (both the
contents AND any formatting) from one sheet of a workbook to another.

Normally, I would use:

{Dim, Set}
Sheet2.Cells(1,1) = Sheet1.Cells(1,1)

but this only duplicates the contents. If, for example, the cell on Sheet1
contained MARTY, with a red background and bold italics font with a cell
comment, the cell in Sheet2 would contain MARTY with default background and
font settings and no comment.

How can I make an EXACT duplicate of the cell?

Please advise. Thanks in advance.

MARTY

JE McGimpsey

Duplicating a cell (EXACTLY)
 
One way:

Sheet1.Cells(1, 1).Copy Destination:=Sheet2.Cells(1, 1)

In article ,
"Marty" wrote:

I'm using Excel 2003. I need to know how to duplicate a cell (both the
contents AND any formatting) from one sheet of a workbook to another.

Normally, I would use:

{Dim, Set}
Sheet2.Cells(1,1) = Sheet1.Cells(1,1)

but this only duplicates the contents. If, for example, the cell on Sheet1
contained MARTY, with a red background and bold italics font with a cell
comment, the cell in Sheet2 would contain MARTY with default background and
font settings and no comment.

How can I make an EXACT duplicate of the cell?


Marty

Duplicating a cell (EXACTLY)
 
That worked well. Thanks very much.

"JE McGimpsey" wrote:

One way:

Sheet1.Cells(1, 1).Copy Destination:=Sheet2.Cells(1, 1)

In article ,
"Marty" wrote:

I'm using Excel 2003. I need to know how to duplicate a cell (both the
contents AND any formatting) from one sheet of a workbook to another.

Normally, I would use:

{Dim, Set}
Sheet2.Cells(1,1) = Sheet1.Cells(1,1)

but this only duplicates the contents. If, for example, the cell on Sheet1
contained MARTY, with a red background and bold italics font with a cell
comment, the cell in Sheet2 would contain MARTY with default background and
font settings and no comment.

How can I make an EXACT duplicate of the cell?




All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com