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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!