Syntax of an OR Statement inside a COUNTIFS
Hello,
I have a formula that is working, but I need to add an OR statement in the priority so the function detects that the if the priority is "Critical" or "Blocker" it will be counted. Here is the formula below, can somebody please help me on where to add the OR statement?
=COUNTIFS({Service Provider Name}, CONTAINS([Partner Name]@row, @cell), {Priority}, "Critical", {Status}, <>"Closed", {Status}, <>"Completed", {Status}, <>"Canceled", {Status}, <>"Duplicate", {Status}, <>"Resolved", {Issue Type}, "Bug", {GSP If Parent}, "0")
OR({Priority}, "Critical", {Priority}, "Blocker"))
Thank you!
Answers
-
@RingJake Here you go. You just list the range once, and then use OR to give it the two choices.
=COUNTIFS({Service Provider Name}, CONTAINS([Partner Name]@row, @cell), {Priority}, OR(@cell = "Critical", @cell = "Blocker"), {Status}, <>"Closed", {Status}, <>"Completed", {Status}, <>"Canceled", {Status}, <>"Duplicate", {Status}, <>"Resolved", {Issue Type}, "Bug", {GSP If Parent}, "0")
There's a good example of this on the Help page for the OR function:
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Terrific, thank you Jeff. Would you mind doing it for this formula too? I'm still having issues getting it just right.
=COUNTIFS({RLZ Service Provider Name}, CONTAINS([Partner Name]@row, @cell), {RLZ Priority}, "Critical", {RLZ Status}, <>"Closed", {RLZ Status}, <>"Completed", {RLZ Status}, <>"Canceled", {RLZ Status}, <>"Duplicate", {RLZ Status}, <>"Resolve", {RLZ Issue Type}, "Bug", {RLZ IfParent}, "0")
-
The syntax is the same:
=COUNTIFS({RLZ Service Provider Name}, CONTAINS([Partner Name]@row, @cell), {RLZ Priority}, OR(@cell = "Critical", @cell = "Blocker"), {RLZ Status}, <>"Closed", {RLZ Status}, <>"Completed", {RLZ Status}, <>"Canceled", {RLZ Status}, <>"Duplicate", {RLZ Status}, <>"Resolve", {RLZ Issue Type}, "Bug", {RLZ IfParent}, "0")
You list the range, {RLZ Priority}, followed by a comma, and then OR statement as the criteria. The @cell tells the formula to examine every cell in the RLZ Priority column to see if any equal Critical or Blocker.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 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!