# Microsoft Office Application Help - Excel Help forum > Excel General >  >  Highlight text only(not cell) in a certain color

## jayanthi_d

Hi,

If a cell contains the words, Hat, Bat, Cat, Mouse, I would like the work Cat to be highlighted in Red, and Mouse in Blue and not the cell to be highlighted.


Appreciate your help.

Jay

----------


## Speshul

You can use conditional formatting to apply any format, including text color, to cells based on their value.

It is in the Styles section on the Home tab on the ribbon

----------


## jayanthi_d

Hi, 

Thanks for the response. I tried Conditional Formatting prior to reaching out to folks in the forum but the results seemed to cater to the overall cell and not a specific text. 

Pardon my ignorance, but do you mind walking me through the process wrt highlighting the text value only?

Thank You
Jay

----------


## Royzer

The attached screenshot was achieved by using conditional formatting in Excel 2007. Is this what you are looking for?

----------


## Pauleyb

If all of those words are in the same cell, the only way I know to have multiple font colors in the same cell is a manual process where you highlight each word individually and then apply the color you want.  I also recorded a macro to see the steps involved in changing the color for specific characters and it provide a good starting point if you want to chase the VBA route.

----------


## Royzer

> If all of those words are in the same cell, the only way I know to have multiple font colors in the same cell is a manual process where you highlight each word individually and then apply the color you want.  I will assume there is a VBA method, too.




Sorry about that. I need to work on my reading comprehension skills.

----------


## FDibbins

when you apply CF, instead if clicking on "fill", select "font" normally the default tab, then apply your FC using font colors as if you wewre doing fill instead

----------


## jayanthi_d

Thanks for all your inputs.

Pauleyb, a working macro sounds great! Could you please provide the macro? 


Best,
Jay

----------


## jindon

If vba then



```
Please Login or Register  to view this content.
```

----------


## Royzer

Jindon, that is absolutely COOL.  :Smilie:

----------


## jindon

> Jindon, that is absolutely COOL.



Thanks and glad you like it.

----------


## Zhian

Digging up an old thread, but this proved very useful for me.

Had to edit the line:




```
Please Login or Register  to view this content.
```


To get it to work correctly for me.  Changed the Range to suit the column I was using, in this case "A1" to "K1" and "a" to "k"


Thanks  :Smilie:

----------


## kwindham

I have the same question as jayanthi_d originally had. I need to highlight a word in a cell - not change the font color of a word in a cell. The responses all seem to be related to how to change the font color versus highlighting a word in a cell. Is there a way to do this? Thanks!

----------


## Pepe Le Mokko

Unfortunately _your post does not comply with Rule 2 of our Forum_ RULES. *Do not post a question in the thread of another member -- start your own thread.* 

If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread. 

Old threads are often only monitored by the original participants.  New threads not only open you up to all possible participants again, they typically get faster response, too.

----------


## kwindham

Sorry for the error. I will create a new post and refer back to this one.

----------


## kingwhopper

Hi,

i liked your VBA code and i am trying to use it for a project at work. i was playing around with your example, the Cat_Mouse.xlsm, and when i modified the 'myList' and 'myColor' arrays, it does not work.


for exmaple, i changed myList to  = VBA.Array("Cat", "Mouse", "bat")
myColor = VBA.Array(vbRed, vbBlue, vbRed)

but the word "Bat" is *not*  colored red. interestingly enough, when i substitute the word "bat" for the word "hat", the word "hat" does change to the red font. any ideas?

i am looking to use this code to address keywords in my excel file by coloring all key words red and i have more than 10 key words.

----------

