Oct 01 2024 02:07 AM
A B
1 '006 1
2 '06 2
3 '6 4
4
5 Total =SUMIFS(B1:B3, A1:A3, "06")
The formula result of =SUMIFS(B1:B3, A1:A3, "06") is 7, while it should be 2...
The same problem with COUNTSIFS.
A possible tweak to the wrong result, is to add a letter in front of the leading zero texts (eg. "V006", "V06" and "V6" in the range A1:A3).
Oct 01 2024 02:14 AM
SolutionSOMEIFS functions converts texts which looks like numbers into the number. Thus resulting criteria is number 6.
Trick is to add CHAR(173) or use SUMPRODUCT
=SUMIFS(B1:B3, A1:A3, CHAR(173) & "06")
Oct 01 2024 02:26 AM
Oct 01 2024 05:54 AM
@STP470 , you are welcome.
Texts to numbers was by design from very beginning, about 30 years ago. Microsoft keeps that for compatibility. Trick with CHAR(173) was found about 20 years ago. In general more than another 2000 characters work if we use UNICHAR().
Oct 02 2024 12:12 AM
Oct 02 2024 11:48 AM
Oct 01 2024 02:14 AM
SolutionSOMEIFS functions converts texts which looks like numbers into the number. Thus resulting criteria is number 6.
Trick is to add CHAR(173) or use SUMPRODUCT
=SUMIFS(B1:B3, A1:A3, CHAR(173) & "06")