Rounding numbers incorrect

L

lgalang

We are getting different result from Excel and from our SAP system when
rounding numbers. Excel seems to be inconsistent with the mathematical rule
of rounding numbers. For example, rounding 3.245 to 2 decimal places results
to 3.25. This is obviously incorrect because if you round 3.25 to 1 decimal
point, Excel gives you 3.3; if you round 3.245 to 1 decimal point, Excel
gives you 3.2 (different from 3.3 which actually came also from 3.245).
 
J

Jerry W. Lewis

What results are you getting from your SAP system? If it rounds 3.245 to
3.24, then it is likely rounding per the ASTM E-29 standard, that rounds
exact ties to the nearest even rounded number (often recommended in
scientific fields)
http://en.wikipedia.org/wiki/Rounding#Round-to-even_method
Excel rounds exact ties (5) to the next larger number, which seems to be the
more common method in financial circles. The ASTM method (called "Banker's
Rounding" by MS for reasons that are not clear to me) is partially
implemented in the VBA Round function (Excel 2000 and later). A VBA user
defined function that fully implements the ASTM method and can also be called
from the Excel worksheet is given at

http://groups.google.com/group/microsoft.public.excel.charting/msg/107fce6145b70d69

As Jan Karel pointed out, double rounding is strongly discouraged in every
field, since it can easily lead to incorrect results.

The topic of this group is things that cause Excel to crach, which this
doesn't. You would have gotten more responses faster in an appropriate group
such as the ones dealing with Worksheet Functions, Programming (if VBA), or
General Questions.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top