Excel: Change cell color based on formula result

Copper Contributor

I have two cells containing data; one cell has text (A, B, C, etc) and one cell has numbers (1, 2, 3, etc).  A third cell has a formula which accesses the first two cells ( =C3&" "&D3 ).  For example if one cell has "1" and the second cell has "A" the result in the third cell would be "1A".

 

How can I get the third cell to change color based on the result of the formula?  I need the result "1A" to be a different color than if the result was "2A", "3B", "5D" and so on.  I've tried using Conditional Formatting (Format only cells that contain...specific text) but it does not seem to work for me, probably because it is only reading the formula not the result.

 

Any ideas from the impressive brain trust here?

6 Replies
How you are using conditional formatting? Can you show some example? Attach a workbook so that we can work on it.

@Harun24HR 

 

Thanks for the response Harun.  Great idea to provide the spreadsheet.  Can you explain how to attach a file to a discussion?

@booker888 

Seems to work OK for me

image.png

@booker888 

Thanks for all the comments folks.  I figured out what the issue was.  The formula being used in the third cell was =C3&" "&D3 

 

It should have been =C3&""&D3  (no space between the quotation marks).

@booker888 

In that case, you might as well use =C3&D3