View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Access Joe Access Joe is offline
external usenet poster
 
Posts: 54
Default Calc sometimes off by a penny

Thanks guys. I appreciate your help.

"Joe User" wrote:

"Access Joe" wrote:
Why is this happening and how can I fix this
before I loose my mind?


I cannot explain the difference between "autosum" and SUM.

But "penny off" errors (more and less) are quite common when using numbers
with decimal fractions. Most such numbers cannot be represented exactly
internally. That leads to all kinds of anomalies. Here's a fun one to try:
=IF(10.1-10=0.1,TRUE). It returns FALSE(!).

Nothing really wrong. It's just an issue with binary computer arithmetic
that we all need to deal with. Two common solutions:

1. Use ROUND prolifically, but prudently. Use if for most calculations with
dollar-and-cents results. Do not use for some intermediate computations,
notably when computing periodic interest rates and when using them to compute
interest, principal and balance in an amortization schedule, for example.

Note: There are good reasons to use ROUND even with such simply
arithmetic operations as =A1-A2. As demonstrated by the 10.1-0.1 example
above, sometimes this can lead to infinitesimal differences that cause
comparision for equality to fail.

2. Set the "Precision as displayed" option (PAD) under Tools Options
Calculation.

I usually deprecate #2 because it is not selective. If you choose to try
it, be sure to make a copy of the Excel file first. Once you set PAD, some
constants might be changed irreversibly. If you decide that was a mistake,
you would have to re-enter the constant. Or return to your back-up copy. ;-)


----- original message -----

"Access Joe" wrote:
Hey everyone. Excel 2003.

I will frequently add up a range of cells (all dollar amounts that were
typed in manually). When I add those numbers up with the calculator, let's
say they equal $1865.60. Then when I take them and put the same exact
numbers into a Column and do an autosum, the number comes up $1865.60. GREAT!

But when I do an =SUM(... and then highlight the cells containing the same
numbers, the total come up $1865.59 (one penny off). Of course, it's not all
the time. But I've noticed a difference sometimes between AutoSum and
manually entering a forumla (usually by just a penny). Why is this happening
and how can I fix this before I loose my mind? Any help would be
appreciated. THANKS!