View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Sum show difference of -0.000000000002501104298755

On Dec 12, 2:11 pm, Chuck wrote:
I read the article but am not sure it applies to this issue.


Well, it does. But I can see how its relevance might be lost in its
overwhelming detail. Try this pointer: http://support.microsoft.com/kb/214118
.. I think the first paragraph directly addresses your problem.

When I expand the decimal places on the column to 30,
[....] I would thing there would need to be some value
besides 0 in position 25 thru 30?


Well, there are. But Excel formats only the first 15 "significant
digits" (i.e. not including leading zeros). I don't know exactly what
your value is; but as an example, if I enter the 24-digit decimal
fraction that you posted into an Excel cell, the exact internal
representation is exactly
-0.00000000000250110429875499,985154767000935027774 881358464398317664745263755321502685546875.
(Note: I use the comma to denote 15 significant digits to the left.)

The bottom line is: even for simple financial computations, it is
prudent to make liberal use of the ROUND function. That will not
eliminate the numerical "error" that is inherent in the representation
of most decimal fractions in the standard binary computer format. But
it will probably be sufficient for your purposes.

Alternatively, you might use the Precision As Displayed calculation
option. But I do not think that is a good approach.


----- original posting -----

On Dec 12, 2:11*pm, Chuck wrote:
Thank You Sheeloo. I read the article but am not sure it applies to this issue.
When I expand the decimal places on the column to 30, there are only 0's
after the second decimal place for each cell in the sum. But the sum has
values other than 0 starting in decimal position 13 thru 24, then all 0s to
position 30. I would thing there would need to be some value besides 0 in
position 25 thru 30?



"Sheeloo" wrote:
Seehttp://www.cpearson.com/excel/rounding.htmfor an excellent article on
the subject...


"Chuck" wrote:


The spreadsheet was created from an Access query where the column is defined
as double with 2 decimil places.
In Excel I expand the column to 30 decimal places and none of the values
have anything but 0 past the second decimal place.
Yet when I =SUM(E1:E763) I get the total of -0.000000000002501104298755.
I have tried changing the format in Excel to currency, general, accounting,
no change?
Any ideas would be appreciated.- Hide quoted text -


- Show quoted text -