Conditional Formatting: different fonts colors for the same text

L

LeeCC

Hello! Friends:

With Conditional Formatting, is it possible to have different font colors
(say 2 colors) in the SAME cell?

Note: I am using LEFT, and MID functions to control the start of the 2
colors of the text value in a single cell.

Appreciate any advice.


Lee CC
----------------------------------------------------------
 
F

FSt1

hi
multiple formats in a cell is dependent on hard TEXT only. it don't apply to
formulas or number unless the number are foramted as text.
reason...multiple formats depend on specific, exact start and stop points
and formulas can return more(or less) data than the formula itself.
personally, i have never tried it with CF but when you mentioned the Left
and Mid function.....probably not.
maybe someonewill prove me wrong and i will learn something.

regards
FSt1
 
L

LeeCC

Thanks for the reply.

If LEFT and MID functions are not good ways, perhaps you could suggest some
other methods.

For example, "APPLE", I want "AP" to be in blue, and "PLE" to be in red.


Lee CC
--------------------------------------------------------------
 
G

Gord Dibben

I think you will have to go with VBA to get your multiple fonts in a cell.

Here is some sample code.

Perhaps you can adjust to suit.

Sub CellFont()
With ActiveCell.Characters(Start:=1, Length:=5).Font
.ColorIndex = 3
.Bold = True
.Underline = True
.Size = 14
End With
With ActiveCell.Characters(Start:=6, Length:=3).Font
.Superscript = True
.ColorIndex = 5
End With
With ActiveCell.Characters(Start:=10, Length:=4).Font
.Bold = True
.Size = 18
.ColorIndex = 6
End With
End Sub


Gord Dibben MS Excel MVP
 
L

LeeCC

Thanks, Mr. Dibben

Got it. I will work on your sample codes.


LeeCC
-------------------------------------------------------------------------
 

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