Syntax of an OR Statement inside a COUNTIFS

Options

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!

Tags:

Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Options

    @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:

    OR Function | Smartsheet Learning Center

    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!

  • RingJake
    RingJake ✭✭✭✭✭
    Options

    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")

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Options

    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!

  • RingJake
    RingJake ✭✭✭✭✭
    Options

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!