Pr0no
Pr0no

Reputation: 4099

Conditional formatting: color a cell based on a comparison with another cell

Consider the following table in Google Sheets:

       |   A     |   B   |  C
   ----+---------+-------+--------
    1  | product | price | target
    2  | apple   | 5     | 6
    3  | pear    | 7     | 4 
    4  | banana  | 2     | 2

What I am looking to do is applying some conditional formatting, but I cannot figure this one out so I hope somene can help me.

What I want to achieve:

Is there any way to achieve this? Whenever a target turns green, it means that for me, this product is in the buying zone and I should look into it more closely.

Any help is greatly appreciated!

Upvotes: 1

Views: 174

Answers (1)

player0
player0

Reputation: 1

green:

=((C2=B2)+(B2<C2))*(C2<>"")

red:

=B2>C2

enter image description here

Upvotes: 2

Related Questions