Forum Discussion
Sum function not working properly
- May 27, 2020
It is a rounding problem. The computer converts your numbers to binary, performs the calculations, then converts it back to base 10. There are some base 10 decimals that cannot be represented exactly as binary fractions. So, you can get small rounding errors.
Any time you are working with decimals, you should round your calculations even if all of the inputs are only to a certain decimal place (especially if you are using something like IF(calcresult=x...).
http://www.cpearson.com/Excel/rounding.htmEdit: but I'm assuming you've already checked the inputs and any precedent calculations as already suggested and confirmed that's not the problem.
What are the sources for all your figures? Do some come from outside sources? Do some come from other mathematical operations, notably multiplication or division, where they might appear as two decimals but in fact carry a de minimus fraction?
Can you not just display two decimals (no need to round)? I mean, if it really is at the level of something like one-millionth, it's not going to become a problem anyway, is it? [I say that, fully realizing that if I were in your place, I'd want to get to the bottom of it too.]