Highlight cell if another cell contains specific text

Closed
Abbi - Jun 10, 2022 at 05:31 PM
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 - Jun 10, 2022 at 08:21 PM
Hello,

I have random text in cell C6 that I would like to highlight green if cell N6 has 'yes', red if cell N6 has 'no', and grey out if cell N6 has 'n/a'. Any suggestions for which formula to use?

Any help would be greatly appreciated!
Related:

1 response

vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 259
Jun 10, 2022 at 08:21 PM
Hello Abbi,

You could simply use Conditional Formatting to do the task for you:-

- Select cell C6 and go to the Home tab then go to the Styles group and select Conditional Formatting.
- Select New Rule.
- The 'New Formatting Rule' dialogue box will appear.
- Select 'Use a formula to determine which cells to format".
- In the text box under the heading 'Format values where this formula is true', type in the following formula:

=N6="Yes"

- Click OK on the 'Format' button. A Format Cells dialogue box will appear.
- Select the shade of green that you would like to use. Click OK.
- The 'New Formatting Rule' dialogue box should still be there. Click OK on this box as well.

The cell formatting for C6 should now be set to green when N6 says "Yes".

Repeat the above steps for the "No" and "n/a" criteria.
Cell C6 should be clear of any formatting if anything other than the required three criteria is used.

I hope that this helps.

Cheerio,
vcoolio.
0