Forum Discussion
alparslan
May 03, 2020Copper Contributor
Countif function do not count correctly
I figure out that countif counts 1.20 as 1.1 It is possibleto find correct solution with "exact if and sum" formulas. you can find the excel file in the attachment.
alparslan
May 03, 2020Copper Contributor
Thank you. It solved the issue. I understand that CountIf is a little bit dangerous. 1.1 and 1.20 is same value on date. 1.1.20. I will prefer to use exact function to count values. I learned =SUMPRODUCT(EXACT(A2;A2:A21)*1) formula is ok also.
SergeiBaklan
May 03, 2020Diamond Contributor
Nope, the same here are 1.1 and 1.10 since COUNTIF converts texts which present numbers to numbers, if don't use CHAR(173).
With SUMPRODUCT() you don't need EXACT, it compares texts as they are. Just
=SUMPRODUCT(--($A$2:$A$21=A2))
is enough.
- alparslanMay 04, 2020Copper Contributor
Thank you. It is less completed.