Google-sheets – Google sheets conditional formatting relative to another cell in the same column

conditional formattinggoogle sheets

I have column B with different values on different rows and I want to set a rule that , for example cell b3 turns red if the value is smaller than that of B2 and green if it's bigger.
I know I need to use conditional formatting, but not sure how?

I tried the solution here (How to conditional format in Google sheets based on cell directly above it?) but that didn't work.

So what I want to say is: "if the cell's value is lower than that of the cell above it, color red, if the cell value is higher than that of the cell above it, color green".

Best Answer

UPDATE FROM COMMENTS:

You need 3 custom format settings, all applide to the range B3:B. The First is set to

Format cells if...     Cell is empty
and the fill is set to None

The second and third are Custom Formula where the Formula are:

For red:

=B4<B3

and for green:

=B4>B3

OLD INFO FOR Comments

enter image description hereYou need 2 conditional format rules. Both applied to cells B2:B, with Custom formula is selected. In the first, set the formula to:

=B1<B2

and set the color to the Red you want to see. In the second, change the formula to

=B1>B2

and select the green color you wish.