COUNTIF formula with 3 criterions

LJK
LJK ✭✭
edited 02/15/22 in Formulas and Functions

Hey everyone,

I am trying to create a formula that counts the cells that are true with two criteria and are flagged red.

=SUM(COUNTIFS({All Nexii HSE Incident Reporting Range 2}, "Hazard ID - Behavior", {All Nexii HSE Incident Reporting Range 1}, "Squamish", {All Nexii HSE Incident Reporting Range 3}, "Flag"))

The formula works great without the third criteria. Any suggestions on how to fix the third criterion? Recommendations are highly appreciated.

Tags:

Answers

  • Garrett Henke
    Garrett Henke ✭✭✭✭✭

    @LJK I am fairly certain that if you remove SUM from the front of your formula that it will work properly. If you are just trying to count the cells that match your criteria you will only need to use the COUNTIFS function

  • LJK
    LJK ✭✭
    edited 02/15/22

    Hi @Garrett Henke

    Thank you for reaching out. Unfortunately unparseable if I do that.

  • LJK
    LJK ✭✭

    Also, the formula works for two criteria, it just doesn't use the third criterion that I have added.

  • Deanna Vandermeer
    Deanna Vandermeer Overachievers Alumni

    Are you asking for it to look for "raised flags"? If so then you simply need to replace the word "Flag" with "1" so your formula should read as ...

    =SUM(COUNTIFS({All Nexii HSE Incident Reporting Range 2}, "Hazard ID - Behavior", {All Nexii HSE Incident Reporting Range 1}, "Squamish", {All Nexii HSE Incident Reporting Range 3}, 1))

    A "1" would indicate that a flag is raised in that particular column. Let me know if this works for you.

    Smartsheet Overachievers Alumni

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!