0
votes

I would like to format cell D2 based on text in C2. I would like D2 to be colored Red if C2 contains text from a drop down of "No" and be colored Green if the text is "Yes". I have tried custom formula containing =IF C2 ("Yes") which Google Sheets seems to accept but he result is not displayed at all.

2
What if it is blank? - user4039065
If its blank the color should just be white. - Randy Bailey

2 Answers

4
votes
  1. Select D2 (or D2:D9 or D2:<somewhere further down>)
  2. Choose Format ► Conditional Formatting
  3. Format cells if... Custom formula is...
            =C2="yes"
  4. Formatting style - choose a green Fill and click Done.
  5. Add new rule then repeat from step 3 with `=C2="no" and a red Fill.

            c2isNo

2
votes

Edit: Actually, if the cell is to have a background of white for anything other than "Yes", then you only need one rule: =C2="Yes" That is, if the default background for the entire sheet is white.

You must add two separate rules to cell D2, one for each color. The formula must look like this:

=$C$2="Yes"

And for anything other than "Yes"

=$C$2<>"Yes"