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
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
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
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
The attached screenshot was achieved by using conditional formatting in Excel 2007. Is this what you are looking for?
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.
Last edited by Pauleyb; 10-05-2012 at 05:02 PM.
Pauley
--------
If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).
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
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Thanks for all your inputs.
Pauleyb, a working macro sounds great! Could you please provide the macro?
Best,
Jay
If vba then
![]()
Please Login or Register to view this content.
Jindon, that is absolutely COOL.![]()
Digging up an old thread, but this proved very useful for me.
Had to edit the line:
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"![]()
Please Login or Register to view this content.
Thanks![]()
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!
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.
Sorry for the error. I will create a new post and refer back to this one.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks