CountIFS formula including OR

LouSnzLouSnz
edited 12/09/19 in Formulas and Functions
04/01/19 Edited 12/09/19

Hello, I am trying to create a complex formula using ranges and inside the COUNTIFS i need to include OR functions, but when i do the below it comes up with error:

=COUNTIFS(OR({Current Jobs Completed Hour}, <7, {Current Jobs Completed Hour}, >18), OR({Current Jobs Created Hour}, <7, {Current Jobs Created Hour}, >18), {Current Jobs New Job or Other?}, <>"Direct Entry", {Current Jobs Current Month}, 1, {Current Jobs New Job or Other?}, <>"KIOSK", {Current Jobs Time}, <60)

 

Can anyone help with what i am doing wrong, or if there is no way you can include the OR inside a COUNTIFS?

Thanks!!!!!

Tags:

Comments

  • Eric M OliveiraEric M Oliveira Employee
    edited 04/03/19

    Hello, 

     

    You're likely receiving the error because the OR functions are within the range section of the COUNTIFS syntax. Being that the column references for both values are the same, you can correct this by placing the OR values within the criteria. For example,

     

    =COUNTIFS({Current Jobs Completed Hour}, OR(@cell < 7, @cell > 18)

     

    Altering this for the other COUNTIFS criteria should resolve the error.

     

    Have a wonderful day,

    Eric  -  Smartsheet Technical Support

  • Paul NewcomePaul Newcome ✭✭✭✭✭

    Basically... You don't include the range within the OR function when used in a COUNTIF(S) or SUMIF(S). You specify the range, then use the OR function with @cell references in the criteria.

    The AND function can also be used the same way.

    thinkspi.com

  • Thank you so much that works :) 

  • Thank you - that helps and now it works :)

  • Paul NewcomePaul Newcome ✭✭✭✭✭

    Happy to help! yes

    thinkspi.com

Sign In or Register to comment.