Syntax with a mix of or, and, contains and not
Hello All,
My formula is:
=IF(OR([Box Shrubs#]@row >= 2, AND([Box Shrubs#]@row = 1, NOT(CONTAINS("hedge", [FN: Pruning]@row),1, "")))))
So basically, if the number at box shrubs is greater and equal to 2 then mark box; OR if box shrubs is equal to one AND the cell Fn: pruning does not contain hedge, then mark box
I keep getting syntax issues or @#incorrect argument.
Best Answer
-
Hello @Craig Lemberger
You're parenthesis at the end are causing the issue.
It should be:
=IF(OR([Box Shrubs#]@row >= 2, AND([Box Shrubs#]@row = 1, NOT(CONTAINS("hedge", [FN: Pruning]@row)))),1, "")
Once you're creating a formula there is a reference that shows up that will help you identify whether you're in a logical statement, value if yes, value if false, or criteria of any function. You can utilize that to identify why your formula is throwing an error message:
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined
Answers
-
Hello @Craig Lemberger
You're parenthesis at the end are causing the issue.
It should be:
=IF(OR([Box Shrubs#]@row >= 2, AND([Box Shrubs#]@row = 1, NOT(CONTAINS("hedge", [FN: Pruning]@row)))),1, "")
Once you're creating a formula there is a reference that shows up that will help you identify whether you're in a logical statement, value if yes, value if false, or criteria of any function. You can utilize that to identify why your formula is throwing an error message:
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined -
you did it again @Melissa Yamada!
Thanks so much!!!!
-
Happy to help! 😊
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67K Get Help
- 441 Global Discussions
- 154 Industry Talk
- 502 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 79 Community Job Board
- 512 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!