# Excel - IF Function Problem - Expert Solution

Question description:
This user has given permission to use the problem statement for this blog.

Hello, i would like to know if a cell has a text value (eg P - for present), can there be a formula or rule that will shade the colour of the cell a particular colour if a certain text is entered? eg for "P" in the cell, the cell colour would turn yellow, and for "A" in the cell the cell colour would turn red. Thank you
Solved by G. A. in 18 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 17/08/2018 - 05:53
Hello
Excelchat Expert 17/08/2018 - 05:53
Welcome to got it pro.
User 17/08/2018 - 05:53
hi - first time user - did you see my problem?
Excelchat Expert 17/08/2018 - 05:54
Yeah.
Excelchat Expert 17/08/2018 - 05:54
I believe the problem is about conditional formatting.
User 17/08/2018 - 05:54
yes, i had a quick look at that function but could not get it to work
Excelchat Expert 17/08/2018 - 05:55
Hmm, don't worry.
Excelchat Expert 17/08/2018 - 05:55
I'm going to show you how to do it.
Excelchat Expert 17/08/2018 - 05:55
Can you give me a few example data?
User 17/08/2018 - 05:57
does that suffice
Excelchat Expert 17/08/2018 - 05:58
Yeah, that is great.
Excelchat Expert 17/08/2018 - 05:59
Do you want to color whole row or just column D?
User 17/08/2018 - 05:59
Cell C1
Excelchat Expert 17/08/2018 - 05:59
Alright, give me a few minutes please.
Excelchat Expert 17/08/2018 - 06:01
Here is how you do it.
Excelchat Expert 17/08/2018 - 06:02
Select column C, and then click on conditional formatting->new rule->Use a formula to determine which cell ....
Excelchat Expert 17/08/2018 - 06:02
Do you follow what I'm saying?
User 17/08/2018 - 06:02
yes
Excelchat Expert 17/08/2018 - 06:03
Great, once you go through the above steps, you will see a box where you would be able to write formula.
User 17/08/2018 - 06:03
yes
Excelchat Expert 17/08/2018 - 06:04
In that box write the formula =\$C1="A" and then click on format button to select color.
Excelchat Expert 17/08/2018 - 06:05
That would give you the rule to color the cell for the letter A
User 17/08/2018 - 06:06
that changes the text colour to yellow (eg) but does not change the cell colour, i would like the cell to be highlighted in yellow, not the font
Excelchat Expert 17/08/2018 - 06:06
Repeat the steps again to create a new rule for the word P, the formula this time should be =\$C1="P"
Excelchat Expert 17/08/2018 - 06:07
You have options to format as you need, for example change font color, border or background color etc
Excelchat Expert 17/08/2018 - 06:07
All are in that format dialogue box.
User 17/08/2018 - 06:07
ok, i just cant see the background colour bit yet will keep looking
Excelchat Expert 17/08/2018 - 06:08
To format the background, you need to go to Fill tab once the format dialogue box appear.
Excelchat Expert 17/08/2018 - 06:08
I'm sending a screenshot for reference.
User 17/08/2018 - 06:08
of course, now i feel dumb,,,,,...
User 17/08/2018 - 06:08
oh perfect - exactly what i need
Excelchat Expert 17/08/2018 - 06:08
Its alright. We all have been there.
Excelchat Expert 17/08/2018 - 06:09
Do you still need the screenshot?
User 17/08/2018 - 06:10
no that is perfect - exactly what i need! - boy am i going to look smart at the next meeting!
Excelchat Expert 17/08/2018 - 06:10
Excelchat Expert 17/08/2018 - 06:10
I would be delighted if you can leave a few kind words in feedback for me.
Excelchat Expert 17/08/2018 - 06:11
Click on END button to close the chat and rate me.
User 17/08/2018 - 06:11
Do i need to score your help or something like that? I will defintely leave a fantastic rating for you!
Excelchat Expert 17/08/2018 - 06:11
Yeah exactly. although it is not a must. But if you can rate me it would mean a lot.

This is the output file from the real Excelchat help session:
This is an example of the expert help you can get. It contains no private user information.

Get instant expert help with Excel and Google Sheets

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Your privacy is guaranteed. Your session will not be used for blog unless you give us persmission.