I am trying to find the result of 692.79-692.45 using Excel, but find the following issue:
692.79 and 692.45 are exact numbers with only two digits, but the result is not 0.34. Is there any solution to this problem? Thanks for any help.
I am trying to find the result of 692.79-692.45 using Excel, but find the following issue:
692.79 and 692.45 are exact numbers with only two digits, but the result is not 0.34. Is there any solution to this problem? Thanks for any help.
Floating point numbers are stored in binary. The translation from decimal to binary causes rounding errors.
See https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html for more details.
There are two potential problems:
In either case you could use:
=ROUND(A1-B1,2)
EDIT#1:
To verify A1 and B1, pick two other cells and enter:
=A1=ROUND(A1,2)
=B1=ROUND(B1,2)
If either formula reports FALSE, you have uncovered the bad data.