Custom Text Format

Sakurkar

New Member
Joined
Oct 10, 2014
Messages
27
Dear friends,
I have three names of planet in one cell. i. e. Sun, Moon, Mars in one cell. I want Mars formatted in red colour.
Can any one help me please.
Thanks.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Set the conditional formatting as:
Format only cells that contain > cell value, equal to, "Mars"
Then choose red in the color section of the format tab.
 
Upvote 0
Set the conditional formatting as:
Format only cells that contain > cell value, equal to, "Mars"
Then choose red in the color section of the format tab.
Dear Kanadaaa,
Thank you very much for your quick reply,
I have done as told by you but unfortunately it is not working.
thanks once again,
Sakurkar, India.
 
Upvote 0
Dear Kanadaaa,
Thank you very much for your quick reply,
I have done as told by you but unfortunately it is not working.
thanks once again,
Sakurkar, India.
You must have done it wrong because it should never happen if you've done it right.
Tell me in detail what you did.
 
Upvote 0
Dear Kanadaaa,
Thank you very much for your quick reply,
I have done as told by you but unfortunately it is not working.
thanks once again,
Sakurkar, India.
Ok I think I get it, you must have input Mars with double quotation marks in the conditional formatting setting.
 
Upvote 0
Try this VBA solution:

VBA Code:
Sub me1160394_colorWord()
    Dim c As Range, w
    
    w = "Mars" 'edit to look for something else
    
    For Each c In Selection
        If InStr(c.Text, w) > 0 Then
            c.Characters(InStr(c.Text, w), Len(w)).Font.Color = vbRed
        End If
    Next
End Sub
Select the cell(s) (can be more than one) containing the words and run this macro. The first occurrence of "Mars" (you can edit this text) will be highlighted in red (replace vbRed with something else if you want a different color).
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,464
Members
449,163
Latest member
kshealy

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