• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

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?
  • 2
1 Solution

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.

barry houdiniCommented:
Try this setup


regards, barry
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.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now