'How do I link the only the formatting between two cells in excel?
I have two sheets; Sheet1
& Sheet2
and want to link the format from A1
Sheet1
to A1
Sheet2
, i.e.
Sheet2
A1
should match the formatting ofSheet1
A1
I don't want to link the value, only the formatting.
I know I can link the value simply by going to sheet2
and typing =='Sheet1'!A1
in cell A1
How do I link only the format?
Solution 1:[1]
This does the trick and can be adjusted as necessary but initially is copies the entire sheet then used Paste Special to paste only formats?
Sub CopyFormat()
'*** Copy the format of an entire sheet to another ***
'*** Should be run from WorkBook_Open event ***
Cells.Select
Selection.Copy
Sheets("Sheet2").Select '*** You could change workbooks here if desired
Cells.Select
Selection.PasteSpecial Paste:=xlPasteFormats, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
End Sub
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | RetiredGeek |