Formula help - Countifs, contains, and adding an OR function
Hi Smartsheet Experts:
I am working on a formula and have gotten stuck. I have a countifs formula, and I need to change it to count customers with either Product A or Product B (some have both) - I can't figure out how to insert an "OR" function into the formula without breaking it.
Right now the formula is actually written as 2 formulas: Status for Product A + Status for Product B. I don't want to double-count customers with product A and B.
Here is the current formula:
=COUNTIFS({Status}, "Completed", {Content Type}, CONTAINS([type]@row, @cell), {Products}, CONTAINS("Product A", @cell)) + COUNTIFS({Status}, "Completed", {Content Type}, CONTAINS([type]@row, @cell), {Products}, CONTAINS("Product B", @cell))
Any ideas?
Thanks!
Best Answer
-
Give this one a go...
=COUNTIFS({Status}, "Completed", {Content Type}, CONTAINS([type]@row, @cell), {Products}, OR(CONTAINS("Product A", @cell), CONTAINS("Product B", @cell)))
Answers
-
Give this one a go...
=COUNTIFS({Status}, "Completed", {Content Type}, CONTAINS([type]@row, @cell), {Products}, OR(CONTAINS("Product A", @cell), CONTAINS("Product B", @cell)))
-
Thanks Paul - it worked - you are a lifesaver!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!