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