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
- 63.7K Get Help
- 406 Global Discussions
- 217 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!