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?
 

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
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:

steve the excel guy

Board Regular
Joined
Aug 28, 2007
Messages
104
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.
 

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
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.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,971
Messages
5,508,471
Members
408,688
Latest member
Bhojraj

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top