Excel not counting values correctly with the COUNTIFS function

Copper Contributor

The problem that I am having with the COUNTIFS function is that the function is seemingly counting less than it should. Each function has the same syntax, expressions, and operators in it, so there shouldn't be a great deal of variability that seems improbable. Furthermore, Each function is counting numbers from the same body of values, so that shouldn't affect it. An example of one of the functions is this:

 

=SUM(COUNTIFS(M14:BQR14,"<"&B4+(B5*B11),M15:BQR15,">"&C4+(C5*B11),M16:BQR16,"<"&D4+(D5*B11))+COUNTIFS(M14:BQR14,">"&B4+(B5*B11),M15:BQR15,">"&C4+(C5*B11),M16:BQR16,"<"&D4+(D5*B11))+COUNTIFS(M14:BQR14,">"&B4+(B5*B11),M15:BQR15,">"&C4+(C5*B11),M16:BQR16,">"&D4+(D5*B11)))

 

And then the problematic function is this: 

 

=SUM(COUNTIFS(M14:BQR14,"<"&B4+(B5*C11),M15:BQR15,">"&C4+(C5*C11),M16:BQR16,"<"&D4+(D5*C11))+COUNTIFS(M14:BQR14,">"&B4+(B5*C11),M15:BQR15,">"&C4+(C5*C11),M16:BQR16,"<"&D4+(D5*C11))+COUNTIFS(M14:BQR14,">"&B4+(B5*C11),M15:BQR15,">"&C4+(C5*C11),M16:BQR16,">"&D4+(D5*C11)))

 

(FYI, B11 > C11)

 

In the first function, it computes a total count of 1727, and the values computed in the criteria are larger, but then in the second function, the function computes a total count of 1725, and the values computed in the criteria are smaller. The count total shouldn't be reducing, right?

 

I can explain more if I'm missing some crucial information, thanks!

2 Replies
I am experiencing the same issue with the totals being out by 1 or two. Have you had any success in finding a solution?

@Rickb274.... Please start a new discussion.  And attach an example Excel file (redacted) that demonstrates the problem.

 

There can be very many reasons why your COUNTIF(S) function does not work.  Off-hand:  (1) the data is not the same type as the condition (depends on the condition); (2) the precision of the numeric data is not what you expect; (3) the text data has unexpected characters; (4) not all conditions are true in the same rows that you expected; (5) you miswrote the condition (e.g. "<B4" instead of "<"&B4); etc, etc, etc.

 

In summary, the devil is in the details.  You didn't even post your formula (clunk!).