Excel not counting values correctly with the COUNTIFS function

%3CLINGO-SUB%20id%3D%22lingo-sub-141112%22%20slang%3D%22en-US%22%3EExcel%20not%20counting%20values%20correctly%20with%20the%20COUNTIFS%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-141112%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSPAN%3EThe%20problem%20that%20I%20am%20having%20with%20the%20COUNTIFS%20function%20is%20that%20the%20function%20is%20seemingly%20counting%20less%20than%20it%20should.%20Each%20function%20has%20the%20same%20syntax%2C%20expressions%2C%20and%20operators%20in%20it%2C%20so%20there%20shouldn't%20be%20a%20great%20deal%20of%20variability%20that%20seems%20improbable.%20Furthermore%2C%20Each%20function%20is%20counting%20numbers%20from%20the%20same%20body%20of%20values%2C%20so%20that%20shouldn't%20affect%20it.%20An%20example%20of%20one%20of%20the%20functions%20is%20this%3A%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSPAN%3E%3DSUM(COUNTIFS(M14%3ABQR14%2C%22%26lt%3B%22%26amp%3BB4%2B(B5*B11)%2CM15%3ABQR15%2C%22%26gt%3B%22%26amp%3BC4%2B(C5*B11)%2CM16%3ABQR16%2C%22%26lt%3B%22%26amp%3BD4%2B(D5*B11))%2BCOUNTIFS(M14%3ABQR14%2C%22%26gt%3B%22%26amp%3BB4%2B(B5*B11)%2CM15%3ABQR15%2C%22%26gt%3B%22%26amp%3BC4%2B(C5*B11)%2CM16%3ABQR16%2C%22%26lt%3B%22%26amp%3BD4%2B(D5*B11))%2BCOUNTIFS(M14%3ABQR14%2C%22%26gt%3B%22%26amp%3BB4%2B(B5*B11)%2CM15%3ABQR15%2C%22%26gt%3B%22%26amp%3BC4%2B(C5*B11)%2CM16%3ABQR16%2C%22%26gt%3B%22%26amp%3BD4%2B(D5*B11)))%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSPAN%3EAnd%20then%20the%20problematic%20function%20is%20this%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSPAN%3E%3DSUM(COUNTIFS(M14%3ABQR14%2C%22%26lt%3B%22%26amp%3BB4%2B(B5*C11)%2CM15%3ABQR15%2C%22%26gt%3B%22%26amp%3BC4%2B(C5*C11)%2CM16%3ABQR16%2C%22%26lt%3B%22%26amp%3BD4%2B(D5*C11))%2BCOUNTIFS(M14%3ABQR14%2C%22%26gt%3B%22%26amp%3BB4%2B(B5*C11)%2CM15%3ABQR15%2C%22%26gt%3B%22%26amp%3BC4%2B(C5*C11)%2CM16%3ABQR16%2C%22%26lt%3B%22%26amp%3BD4%2B(D5*C11))%2BCOUNTIFS(M14%3ABQR14%2C%22%26gt%3B%22%26amp%3BB4%2B(B5*C11)%2CM15%3ABQR15%2C%22%26gt%3B%22%26amp%3BC4%2B(C5*C11)%2CM16%3ABQR16%2C%22%26gt%3B%22%26amp%3BD4%2B(D5*C11)))%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSPAN%3E(FYI%2C%20B11%20%26gt%3B%20C11)%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSPAN%3EIn%20the%20first%20function%2C%20it%20computes%20a%20total%20count%20of%201727%2C%20and%20the%20values%20computed%20in%20the%20criteria%20are%20larger%2C%20but%20then%20in%20the%20second%20function%2C%20the%20function%20computes%20a%20total%20count%20of%201725%2C%20and%20the%20values%20computed%20in%20the%20criteria%20are%20smaller.%20The%20count%20total%20shouldn't%20be%20reducing%2C%20right%3F%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSPAN%3EI%20can%20explain%20more%20if%20I'm%20missing%20some%20crucial%20information%2C%20thanks!%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-141112%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20Desktop%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20%26amp%3B%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

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!).