Forum Discussion
Using COUNTIFS and Blank Criteria

Hi John Triebe,
The original File that you had sent, contains formulas which I believe have evaluated correct results. If these are not the correct results, then enter the correct results on another column, with reasons why the existing results are incorrect.
Have you tested the formulas that I had sent? Is there any difference from the results of these formulas and the expected results? Can you mention the details?
You may reattach the file, highlighting the cells where the results are not as per your expectations.
Vijaykumar Shetye,
Panaji, Goa, India
- John TriebeAug 26, 2018Copper Contributor
Yes, I did try your method and it did not provide the correct result. I've attached another small spreadsheet showing the correct results (in green) and what I get (in RED) if I try using the COUNTIFS function in which one or more of the criteria reference cells contains a blank, and then copying that for multiple sets of criteria. I hope this better explains what I'm trying to accomplish. And I'll also ask that if the COUNTIFS function will not work in this situation, is there a statement using another function that could be copied to provide the correct results?
- SergeiBaklanAug 27, 2018Diamond Contributor
Hi John,
I'd use
=SUMPRODUCT(($B$4:$B$17=H5)*($C$4:$C$17=I5)*($D$4:$D$17=J5)*($E$4:$E$17=K5))
and attached
- John TriebeAug 27, 2018Copper Contributor
Thanks, that did the trick. It is interesting that the COUNTIFS function does not like criteria references to blank cells, but the SUMPRODUCT function can handle that. I'm unsure why but perhaps it is one of those "undocumented" features.