IF with nested OR and AND
Hello,
I'm struggling with this formula and getting and incorrect argument error.
I'm wanting my priority column to give me the correct drop down ("Half") if either or both of my conditions or met. Here's what I have.
=IF(OR(AND([Micro or QC?]@row = "Micro", AND([Micro or QC?]@row = "QC"), "Half")))
I can get the formula to work with the OR statement, but I cannot get it to work if I try to add AND.
What am I missing here?
Best Answer
-
I think you're overthinking it. In evaluating a regular column, you just need the OR, because what OR really means in Smartsheet is "if at least one of these is true..."
=IF(OR([Micro or QC?]@row = "Micro", [Micro or QC?]@row = "QC"), "Half")
But with a multi-select column, you should use CONTAINS along with the OR.
=IF(OR(CONTAINS("Micro", [Micro or QC?]@row), CONTAINS("QC", [Micro or QC?]@row)), "Half")
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Answers
-
I think you're overthinking it. In evaluating a regular column, you just need the OR, because what OR really means in Smartsheet is "if at least one of these is true..."
=IF(OR([Micro or QC?]@row = "Micro", [Micro or QC?]@row = "QC"), "Half")
But with a multi-select column, you should use CONTAINS along with the OR.
=IF(OR(CONTAINS("Micro", [Micro or QC?]@row), CONTAINS("QC", [Micro or QC?]@row)), "Half")
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Hello!
I was definitely overthinking it. 😌
Thank you so much!
Help Article Resources
Categories
Check out the Formula Handbook template!