ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   What formula will copy the content & format of the target cell? (https://www.excelbanter.com/excel-discussion-misc-queries/142434-what-formula-will-copy-content-format-target-cell.html)

razorman

What formula will copy the content & format of the target cell?
 
I know the simple "=C5" will copy the content of cell C5 but I also want the
cell to copy the format, color, etc. I'm trying to create a schedule where
the information can be entered once and repeated into several different cell
throughout the worksheet.

JE McGimpsey

What formula will copy the content & format of the target cell?
 
Formulae only return values to their calling cells, they can't return
formatting. For that, you'd need an event macro. For instance, put
something like this in your worksheet code module (right-click the
worksheet tab and choose View Code):


Private Sub Worksheet_Calculate()
Range("C5").Copy Destination:=Range("J1, K2, L3")
End Sub


Note that changing formats doesn't fire an event, so you'll have to
initiate a calculation to force the copy.


In article ,
razorman wrote:

I know the simple "=C5" will copy the content of cell C5 but I also want the
cell to copy the format, color, etc. I'm trying to create a schedule where
the information can be entered once and repeated into several different cell
throughout the worksheet.


MyVeryOwnSelf

What formula will copy the content & format of the target cell?
 
I know the simple "=C5" will copy the content of cell C5 but I also
want the cell to copy the format, color, etc. I'm trying to create a
schedule where the information can be entered once and repeated into
several different cell throughout the worksheet.


Here’s a way that may work for you, provided no formulas refer to the
"different" cells. Any formulas using the value need to refer to the
original cell (C5).

1. Select C5 and use
Edit Copy

2. Select a "different" cell.

3. While holding down the Shift key, use
Edit Paste picture link

Repeat steps 2 and 3 for other "different" cells.

Notice that the "picture link" size doesn't track changes if you
add/delete/resize rows or columns. Basically, it's kind of like a graphic
item that floats above the worksheet.

There are those caveats, but maybe picture links would work in this
situation.


All times are GMT +1. The time now is 01:24 AM.

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