views:

307

answers:

3

Is there any way to change the color and/or font of specific text within an excel cell? That is, I'd like one part of the cell's displayed value to be red and another part of the same cell's displayed value to be blue (as an example). Since the displayed values are being calculated as formulas, I'd need some sort of formatting formula that would apply only the stuff inside the formula. I can't seem to find anything in the text.

A: 

No problem. Edit the value in the formula toolbar.

Mick Sharpe
Oops! Missed the part about it being a calculated value. Conditional formatting is the way to go.
Mick Sharpe
+1  A: 

If you want to do this based on a formula, you will have to write some VBA. See this example

Maurits Rijk
Could I use the VBA technique to apply different fonts as well?
jhc
Yes. You can change any attribute. Font name and type, bold, strikethrough, etc. etc. this way. There are many VBA examples available on how to do this.
Maurits Rijk
A: 

Take a look at Conditional Formatting in excel.

alt text

Yada
I can't use conditional formatting because I want the fonts/colors to apply to specific calculated values within the cell. I am creating an inline bar graph. I'd like to format the bar graph using one font and the associated value using a different font.
jhc