I have cells with formulas and want to add styles to the cells depending on the outcome (X) of the formula.
The condition for the formatting depends on comparison of X with values of other cells. Therefore I need to use X more than once to determine the formatting.
Example (with values instead of formulas and cell references and Red, Green being styles):
=2+STYLE(IF(CURRENT()>1;“Green”;“Red”)) works
=2+STYLE(IF(AND(CURRENT()>1;CURRENT()<3);“Green”;“Red”)) does not work
=A2+$B2 +STYLE(IF(AND(CURRENT()>C2;(CURRENT()+$D$1/E2)<3);“Green”;“Red”))
How do I solve this?