R
riccifs
Hi to everyone,
does anyone to know how to change the font color of a cell with text
and formula in it?
I mean, If I have ="Hallo "&SUM(A1+5), how can I make Hallo became red
and the result of the formula became blue?
I'm trying with that, it works for a pure text but not for a mixed
text and formula.
Can anyone help me!?
Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Range("E1")
With Target.Characters(Start:=1, Length:=3).Font
.ColorIndex = 3
End With
With Target.Characters(Start:=4, Length:=15).Font
.ColorIndex = 5
End With
End Sub
Many thanks,
Stefano.
does anyone to know how to change the font color of a cell with text
and formula in it?
I mean, If I have ="Hallo "&SUM(A1+5), how can I make Hallo became red
and the result of the formula became blue?
I'm trying with that, it works for a pure text but not for a mixed
text and formula.
Can anyone help me!?
Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Range("E1")
With Target.Characters(Start:=1, Length:=3).Font
.ColorIndex = 3
End With
With Target.Characters(Start:=4, Length:=15).Font
.ColorIndex = 5
End With
End Sub
Many thanks,
Stefano.