Search code examples
if-statementgoogle-sheetsbooleanconditional-formattingboolean-logic

Format column based on previous columns value


I am trying to format the colours within my google sheet based on the previous columns value. I have tried to implement it with conditional format rules but the results are inconsistent and not reflecting the correct colours.

I have tried to apply a custom formula for positive numbers =(D3-C3)>0 and =(D3-C3)<0 for negative. This results in what is shown in the image. I'm not sure if it is because of the range?

enter image description here enter image description here


Solution

  • try:

    =($D3-$C3)>0
    

    and:

    =($D3-$C3)<0
    

    update:

    enter image description here