![]() |
mix font attributes of text returned from cell formula
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 |
mix font attributes of text returned from cell formula
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 --------------- Jacob Skaria "David" wrote: 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 |
mix font attributes of text returned from cell formula
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 On 23 Sep., 20:05, David wrote: 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 |
All times are GMT +1. The time now is 12:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com