If(And(Or

I'm trying to create a formula that includes If, And, and Or in it and I'm having trouble figuring out the correct way to write it.

Written out what I need is:

If "restrictions in place through" is greater than 3/28/2020 OR equals UFN AND "max # of people.." is greater than 0 make "local ordinance status" yellow

and

If "restrictions in place through" is greater than 3/28/2020 OR equals UFN AND "max # of people.." is equal to 0 make "local ordinance status" red

I've been trying to write the just the first part of this first to make sure I have it correct and so far have:

=IF(AND([Restrictions In Place Through:]@row >= DATE(2020, 3, 28), OR([Restrictions In Place Through:]@row = "UFN"), [Max # of people allowed to gather]@row > 0), "Yellow", "Red")


I also tried it with the OR at the beginning as well and couldn't get it to work. Any help would be appreciated!




Best Answers

  • taylor.thompson89836
    Answer ✓

    They were able to get it to work for me with this:

    =IF(AND([Max # of people allowed to gather]@row = 0, IFERROR([Restrictions In Place Through:]@row > DATE(2020, 3, 28), [Restrictions In Place Through:]@row = "UFN")), "Red", IF(AND([Max # of people allowed to gather]@row > 0, IFERROR([Restrictions In Place Through:]@row > DATE(2020, 3, 28), [Restrictions In Place Through:]@row = "UFN")), "Yellow", "Green"))

«1

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!