Using IF with CONTAINS and AND for multiple columns
I am looking at two different columns - one is called Status and the other Priority. I would like to have a formula/function setup that will look for "Open" within the Status column and "High" within the Priority column. If it finds "Open" and "High" together in any row, I want a "True" value returned. This will be used in a sheet summary. So far, I have
=IF(CONTAINS(AND("Open", Status:Status), ("High", Priority:Priority)), "True", "False"). This gets me an #UNPARSABLE error.
I'm stuck. Please help.🙂
Best Answer
-
Use a COUNTIFS inside of the IF. First the COUNTIFS will generate a count of how many rows match your range/criteria sets. Then you use the IF to say that if the countifs output is greater than zero, output "True", otherwise "False".
=IF(COUNTIFS(Status:Status, @cell = "Open", Priority:Priority, @cell = "High") > 0, "True", "False")
Answers
-
Use a COUNTIFS inside of the IF. First the COUNTIFS will generate a count of how many rows match your range/criteria sets. Then you use the IF to say that if the countifs output is greater than zero, output "True", otherwise "False".
=IF(COUNTIFS(Status:Status, @cell = "Open", Priority:Priority, @cell = "High") > 0, "True", "False")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!