Conditional formatting for text within cell, not cell itself

jatstern

New Member
Joined
Jun 18, 2015
Messages
2
I'm trying to create a formula in Excel 2010 that changes the color of certain text within a cell--not the entire cell itself. Is this possible?

For example, one cell says: "Nationals vs Orioles @ Camden Yards. JS, KC."

Every time I type the initials "JS" or "KC" on my spreadsheet, I want "JS" to automatically be one color and "KC" another color. Can I create a formula that automatically changes the color of the initials? *Important: I don't want to put the initials in separate cells from the rest of the text.

I hope this makes sense. I can't find the answer in the forum, so I hope I'm not being repetitive. Thank you for the help!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I believe it's 'no can do.' I looked all over one of the internets once and no one has been able to solve it.
 
Upvote 0
A macro could be used to colour part of the text within a cell. The example below contains a for loop that loops through rows in a spreadsheet and colours the word hot in a cell in red and the word cool in a cell in blue, leaving the rest of the cell in its original colour.

It does this using the Characters object and the Font.Color property:

Excel Macros - For Loop to Colour Part of Cells
 
Upvote 0

Forum statistics

Threads
1,217,476
Messages
6,136,876
Members
450,029
Latest member
MissQuotation

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top