COUNTIFS Struggle – Need a Hand!

Hi everyone! I'm looking for some help with a COUNTIFS
formula.
I'm trying to count how many contractors vs. employees we have on a sheet. Counting employees was straightforward since there's only one type. However, there are multiple types of contractors, and I'm not sure how to count all of them together.
I've attached my not-so-great formula—hoping it might be a quick fix?
Best Answers
-
Hi @fiorellag
Please try the following formula:
=SUM(COUNT(COLLECT({TBD RMT Range 1}, {TBD RMT Range 1}, [Column2]1)), COUNT(COLLECT({TBD RMT Range 1}, {TBD RMT Range 1}, [Column4]1)), COUNT(COLLECT({TBD RMT Range 1}, {TBD RMT Range 1}, [Column5]1)))
The key difference is that we need to sum all the matching values being found.
Hope this helps.
-
Your formula is close. Your syntax for the OR is just a bit off is all.
=COUNTIFS({Range}, OR(HAS(@cell, [Column2]1), HAS(@cell, [Column4]1), HAS(@cell, [Column5]1)))
You can also simplify a bit by specifying that we count everything that is not [Column3]1
=COUNTIFS({Range}, NOT(HAS(@cell, [Column3]1)))
It can be even more simplified if you are not referencing a multi-select dropdown by looking for equal or not equal to.
Answers
-
Hi @fiorellag
Please try the following formula:
=SUM(COUNT(COLLECT({TBD RMT Range 1}, {TBD RMT Range 1}, [Column2]1)), COUNT(COLLECT({TBD RMT Range 1}, {TBD RMT Range 1}, [Column4]1)), COUNT(COLLECT({TBD RMT Range 1}, {TBD RMT Range 1}, [Column5]1)))
The key difference is that we need to sum all the matching values being found.
Hope this helps.
-
Your formula is close. Your syntax for the OR is just a bit off is all.
=COUNTIFS({Range}, OR(HAS(@cell, [Column2]1), HAS(@cell, [Column4]1), HAS(@cell, [Column5]1)))
You can also simplify a bit by specifying that we count everything that is not [Column3]1
=COUNTIFS({Range}, NOT(HAS(@cell, [Column3]1)))
It can be even more simplified if you are not referencing a multi-select dropdown by looking for equal or not equal to.
Help Article Resources
Categories
Check out the Formula Handbook template!