How do I link the same format when using the "=" command

E

E. Giagozoglou

I am trying to link from s/sheet A to s/sheet B by using the = command. So
when I change the wording in s/heet A, s/heet B changes automatically. The
issue is that one word is in bold however, in s/heet B it doesn't come across
as Bold. How do I get the same format to come accross. Don't want to copy
and paste special because it wont link the fields. Want to be able to change
it in s/sheet A and then s/heet B to change accordingly
 
J

JE McGimpsey

Formulae return values, not formatting, so there's no way for a formula
or link to return your cell's formatting.

You can use a VBA event macro to do this. One way (put this in the
destination sheet's worksheet code module: right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Activate()
CopyA1
End Sub

Private Sub Worksheet_Calculate()
CopyA1
End Sub

Private Sub CopyA1()
Dim rSource As Range
Dim i As Long
Set rSource = Sheets("Sheet2").Range("B1")
With Range("A1")
.Value = rSource.Text
For i = 1 To Len(.Text)
.Characters(i, 1).Font.Bold = _
rSource.Characters(i, 1).Font.Bold
Next i
End With
End Sub


Change the sheet name, "A1" and "B1" to suit.
 
Top