Nested IF OR Statement

Options

Hello community...I am looking to complete a nested IF OR statement and am missing something. I want to return red if either values are below 0, Yellow if both are between 0 & 8 or $0 & $250,000, green if both are above 8 & $250,000

Cell Name - INVESTIGATE33

Value - 6

Cell Name - INVESTIGATE57

Value $235,000

Here is what I have

=IF(OR(INVESTIGATE33 < 0, INVESTIGATE57 < 0), "Red", IF(OR(INVESTIGATE33 > 0 < 8, INVESTIGATE57 > 0 < 250000), "Yellow", "Green")))

Answers

  • DKazatsky2
    DKazatsky2 ✭✭✭✭✭
    Options

    Hi @John Littler ,

    Try this.

    =IF(OR([INVESTIGATE33]@row < 0, [INVESTIGATE57]@row < 0), "Red", IF(AND(AND([INVESTIGATE33]@row >= 0, [INVESTIGATE33]@row <= 8), [INVESTIGATE57]@row >= 0, [INVESTIGATE57]@row <= 250000), "Yellow", "Green"))

    Assumes 0 and 8 are included in the yellow status.

    Hope this helps.

    Dave

  • DKazatsky2
    DKazatsky2 ✭✭✭✭✭
    Options

    I realize that a double "AND" is probably not needed.

    This should also work" =IF(OR([INVESTIGATE33]@row < 0, [INVESTIGATE57]@row < 0), "Red", IF(AND([INVESTIGATE33]@row >= 0, [INVESTIGATE33]@row <= 8, [INVESTIGATE57]@row >= 0, [INVESTIGATE57]@row <= 250000), "Yellow", "Green"))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!