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
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
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
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!