Excel not counting values correctly with the COUNTIFS function

queenjauvier

New Member
Joined
Jan 2, 2018
Messages
3
[FONT=&quot]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 should 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:[/FONT]
[FONT=&quot]=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)))[/FONT]
[FONT=&quot]And then the problematic function is this: [/FONT]
[FONT=&quot]=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)))[/FONT]
[FONT=&quot]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?[/FONT]
[FONT=&quot]I can explain more if I'm missing some crucial information, thanks![/FONT]
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You have both <...*B11 and >...*B11 in your COUNTIF statement, and in a COUNTIF all conditions have to be met to be counted. It is definitely possible that using a smaller number inyour qualifier can result in fewer values falling within that range... A smaller number might drop the lower limit of the acceptable range, but it's also dropping the upper limit too. If they were all >...*B11, then I think a lesser result would logically be impossible for C11<b11.
< B11.

Does this make sense?</b11.
 
Last edited:
Upvote 0
<b11.
I understand, however, I can't change the operators because of how I'm supposed to do the computations, but thanks for the suggestion. </b11.
 
Upvote 0
Oh no that's fine, wasn't suggesting you could haha. Was just giving an example of when it WOULD be an impossibility of a lesser count
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top