Using Countifs on the same Column Multiple Times

Is it possible to use Countifs in this way:

I would like to count X if A is true and B is true or C is true or D is true or E is true .
B, C, D, and/or E are all in Column O. A is in column P

So essentially I'm looking for a way to make the formula work with:

Countifs(P:P, "variable A", AND O:O, "variable B", OR O:O "variable C", OR O:O, "variable D") etc....

If not, what can I use to accomplish?
Who is Participating?
barry houdiniConnect With a Mentor Commented:
Try this setup


regards, barry

I would use SUMPRODUCT with boolean-arrays, where multiplication corresponds AND and addition corresponds OR, so something like:

in this part:
you use the same column, so it is not possible that two or more part is true at the same time. If it is not the case, you need to use an additional checking:

Anyway, would be great to see the original problem to write the correct boolean-tests.

wow, that is great barry! I did not know it could work this way with array.
-PolakAuthor Commented:
Beautiful, I'm glad we could all learn something here today.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.