Forum Discussion
Sorting and Floating Point Rounding Error
I'm sure I could explain it in detail if you provided some details -- a numerical example. Ideally, attach an example Excel file (redacted) that demonstrates the problem.
You have already offered one theory: floating-point rounding "error" (I prefer "anomalies").
That might alter the sort order, which in turn might alter the arithmetic result.
However, usually that difference is infinitesimal; not large enough by itself to cause a "penny" off.
I suspect that you have "normal" rounding errors -- that is, failing to round calculations such as 123.45 * 12.34% -- and perhaps that combined with floating-point anomalies cause the penny-off differences.
But that is wild speculation. It is difficult to say anything more without a concrete example with sufficient detail (including formulas) for us to duplicate the problem independently.
I presume you understand why enabling "Precision as displayed" corrects the problem. But I usually deprecate the use of PAD because of its broad implications and potential for unintentionally changing some constant values permanently.
I hope you were wise enough to enable PAD in a copy of the original file.