Using IF AND & OR in the same function
I've seen a couple questions involving AND and ORs separately but nothing involving them together with IF.
I'm trying to get a checkbox to automatically check if the following criteria match:
Self Survey Column is green
Workshop Attended Column is checked off
Evaluations Column is either "completed" or 5 or above.
The first 2 bits are easy- =IF(AND([LCP Workshop Attended]@row = 1, [Self Survey]@row = "green"), 1, "")
But when I try to add the OR in like such:
=IF(AND([LCP Workshop Attended]@row = 1, [Self Survey]@row = "green", OR(Evaluations@row = "completed", Evaluations@row = >4)), 1, 0)
I get an Invalid Operation. I can only assume that means I must not be putting the OR in the correct spot, but the last data set is the only part that has 2 acceptable answers, so I was assuming if I put the OR earlier, it would think any of the 3 columns would be acceptable to base the criteria off of instead of all 3.
Please help.
Best Answer
-
The issue is in the bold portion below:
=IF(AND([LCP Workshop Attended]@row = 1, [Self Survey]@row = "green", OR(Evaluations@row = "completed", Evaluations@row = >4)), 1, 0)
Try
>=
Answers
-
The issue is in the bold portion below:
=IF(AND([LCP Workshop Attended]@row = 1, [Self Survey]@row = "green", OR(Evaluations@row = "completed", Evaluations@row = >4)), 1, 0)
Try
>=
-
Such a simple change. It never occurred to me because most of my other formulas have it that way. I assumed my syntax had to be off a lot more than that. Neat!
As always sir, you are correct and I thank you.
-
Happy to help. 👍️
You should actually be getting errors on those other formulas as that is one of the rules that (typically) cannot be broken.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives