mix font attributes of text returned from cell formula

D

David

Say, for example I have worksheet formula =3*4&" ABC"
12 ABC displays in the cell
The cell font color is formatted as black
Is there a VBA way to have the displayed character "C" in red font for
example?
My guess is "no"
I'm just hoping someone will suprise me
Thanks
 
J

Jacob Skaria

For a formula cell no.. or other wise

Range("B11").Characters(Start:=Len(Range("A1")), Length:=1).Font.ColorIndex
= 3

If this post helps click Yes
 
P

Per Jessen

Hi

If you need to retain the formula, the answer is no, but if the
formula can be transformed to a 'value' with Copy/PasteSpecial, it
can be done as below:

Sub ColorLastLetter()
ActiveCell.Copy
ActiveCell.PasteSpecial xlPasteValues
ActiveCell.Characters(Start:=Len(ActiveCell),
Length:=1).Font.ColorIndex = 3
End Sub

Regards,
Per
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top