Errin in function COUNTIF/COUNTIFS

pinarello

New Member
Joined
Jun 1, 2019
Messages
42
Hello,


assuming you have classification characteristics in your master data and you would like to know how often a characteristic is assigned, then you use either the function COUNTIF or COUNTIFS.


In this case, you will always get incorrect results if the classification characteristic was entered as text, but only consists of digits and the total length is more than 16 characters.

Example:

column A
[TABLE="width: 225"]
<colgroup><col></colgroup><tbody>[TR]
[TD]102030405060708090[/TD]
[/TR]
[TR]
[TD]102030405060708091[/TD]
[/TR]
[TR]
[TD]102030405060708092[/TD]
[/TR]
[TR]
[TD]102030405060708093[/TD]
[/TR]
[TR]
[TD]102030405060708094[/TD]
[/TR]
[TR]
[TD]102030405060708095[/TD]
[/TR]
[TR]
[TD]102030405060708096[/TD]
[/TR]
[TR]
[TD]102030405060708097

Formula: =COUNTIFA1:A99;"102030405060708090")

Expected and correct result = 1 but Excel says 8.

But in case of:

Column A
[TABLE="width: 225"]
<colgroup><col></colgroup><tbody>[TR]
[TD]My_parents_are_older_than_me_1[/TD]
[/TR]
[TR]
[TD]My_parents_are_older_than_me_2[/TD]
[/TR]
[TR]
[TD]My_parents_are_older_than_me_3[/TD]
[/TR]
[TR]
[TD]My_parents_are_older_than_me_4[/TD]
[/TR]
[TR]
[TD]My_parents_are_older_than_me_5

Formula: = =ZÄHLENWENN(A1:A99;"My_parents_are_older_than_me_1")

[/TD]
[/TR]
</tbody>[/TABLE]
Excel show the correct result "1".[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Yes, this is how the correct result is displayed. Thanks for the tip.


But Microsoft could still correct the error in COUNTIF and COUNTIFS
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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