Thread: Formula error
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Formula error

"Dee" wrote:
I have a simple calculation C8-C14
I get a result of -1.42109E-13
What could I have done wrong?


Nothing really, except: you probably should be rounding results. At a
minimum, ROUND(C8-C14,2). But if C8 or C14 contains a formula, not a
constant, you will probably stumble onto fewer problems if you do
=ROUND(formula,2) in each of those. Apply the same recommendation to all
cells with formulas.

The problem has to do with the fact that in Excel, most numbers with decimal
fractions cannot be represented exactly. For example, 100.01 (A1) is
actually estimated internally by
100.010000000000,005115907697472721338272094726562 5, and 0.01 (A2) is
0.0100000000000000,0020816681711721685132943093776 702880859375. But A1-100
(A3) results in a different approximation of 0.01, namely
0.0100000000000051,159076974727213382720947265625. (The comma is my way of
demarcating 15 significant digits to the left).

You can see that the two estimations of 0.01 are different. And in this
case, A2-A3 (A4) results in about 5.1157E-15.

But if A3 were =ROUND(A1-100,2), the resulting approximation of 0.01 would
be the same as 0.01. Nonetheless, to be safe, I would still compute
ROUND(A2-A3,2). That ensures that "what you see is what you get".

Alternatively, you could set the calculation option "Precision as displayed"
(Tools Options Calculation). But that affects all cells in the workbook
that are not formatted General. I do not recommend it.

It is important to understand that formatting the cells as Number with 2
decimal places does not change the underlying values. Consequently, it does
not fix the problem unless you set "Precision as displayed".

Moreover, you should make prudent decision when __not__ round. For example,
if annual interest is 4.5%, I calculate monthly interest as 4.5%/12 without
rounding.


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

"Dee" wrote in message
...
I have a simple calculation C8-C14 that I use to figure my budget
difference. It works in all the monthly columns I have set up except for
one. I get a result of

-1.42109E-13

What could I have done wrong?????