Countifs Formula - Excluding a value in a Range

How can fix my COUNTIFS formula, where I have 5 ranges (columns), but want to exclude a value range in 2 of the columns respectively.

=COUNTIFS({Range 6}, "05. Trust Administration", {Range 3}, "Bokamoso"), {Range 2}, "Must Do", NOT({Range 1}, "Existing Project", {Range 5}, "Done")


What I need to count all items in Ranges 6, 3 and 2, but I need to exclude one value in ranges 2 and 5 respectively

Can someone perhaps assist please?

Best Answer

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    Hey @Melani

    Happy to help

    COUNTIFS always have the syntax (range1, criteria1, range2, criteria2, range3, criteria3, etc.). We don't close the countifs function until all the criteria are included. The formula started off with the correct syntax but in the middle, the NOT syntax was misplaced. The NOT function is part of criteria, not the range. When I write NOT in a formula my preference is to write <> as Not Equal. It is a preference

    =COUNTIFS({Range 6}, "05. Trust Administration", {Range 3}, "Bokamoso", {Range 2}, "Must Do", {Range 1}, <>"Existing Project", {Range 5}, <>"Done")

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Answer ✓

    Hey @Melani

    Happy to help

    COUNTIFS always have the syntax (range1, criteria1, range2, criteria2, range3, criteria3, etc.). We don't close the countifs function until all the criteria are included. The formula started off with the correct syntax but in the middle, the NOT syntax was misplaced. The NOT function is part of criteria, not the range. When I write NOT in a formula my preference is to write <> as Not Equal. It is a preference

    =COUNTIFS({Range 6}, "05. Trust Administration", {Range 3}, "Bokamoso", {Range 2}, "Must Do", {Range 1}, <>"Existing Project", {Range 5}, <>"Done")

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!