Color part of a cell's contents

steve the excel guy

Board Regular
Joined
Aug 28, 2007
Messages
104
I have looked everywhere and can't seem to find a simple way. First, I was looking for a formula to add into the following:

=TEXT(TODAY(),"mmmm d, yyyy")&" ["&TEXT(TODAY(),"dddd")&"]"

...where the day part would show up as a different color, whether it be red or dark grey... whatever.

Right now, the outcome accurately shows as July 30, 2010 [Friday]. I want [Friday] to be a different color. Is that possible?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Sorry, but it's not possible.

If the cell contains a formula, any formatting will apply to the ENTIRE result of the formula.


If you wanted part of the cell to be a different format, you would have to remove the formula.
Copy / Paste Special / Values

Then you can change the font for just part of the cell's value.
 
Last edited:
Upvote 0
Arrgghh... ok well thank you.

I guess the alternative is to do something in VBA, right? There has to be some kind of possibility because if I type "FRIDAY" into a cell and manually highlight "DAY", I can change the font color of part of the word.

So perhaps there is a way in VBA to call "[FRIDAY]" and change it's color? I think I ran across a VBA command called RGB or something in the past. I don't know how to use it though.
 
Upvote 0
Even in VBA, if the cell contains a formula, then no.

But if you want a vba approach to remove the formula, and apply formatting to the remaining value, then yes it's doable.
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,970
Members
448,933
Latest member
Bluedbw

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