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
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!