View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Peculiar Result with SUM

Computers store numbers in binary (base 2) numbers. Some decimal (base 10)
numbers do not have an exact representation in binary. (Just as the fraction
1/3 has no exact decimal representation)
So we get minor errors such as the one you have found. You could avoid this
using =ROUND(SUM(A1:A7),2) to round your answer to 2 decimal places - since
this is the maximum precision of the data.

Want to learn more about the IEEE 754 standard?
Chip's clear explanation
http://www.cpearson.com/excel/rounding.htm

Floating-point arithmetic may give inaccurate results in Excel
http://support.microsoft.com/kb/78113/en-us

(Complete) Tutorial to Understand IEEE Floating-Point Errors
http://support.microsoft.com/kb/42980

What Every Computer Scientist Should Know About Floating Point
http://docs.sun.com/source/806-3568/ncg_goldberg.html
http://www.cpearson.com/excel/rounding.htm

Visual Basic and Arithmetic Precision
http://support.microsoft.com/default...NoWebContent=1

Others:
http://support.microsoft.com/kb/214118

http://docs.sun.com/source/806-3568/ncg_goldberg.html



Other replies may tell you about the option "Precision as Displayed" but
this can generate problems.
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Seanie" wrote in message
...
I have 7 rows of data in one column, the SUM of which adds up to Zero,
as expected, except it doesn't. In the SUM cell formatting to 13
decimal place shows as 0000etc13. I've even retyped the 7 rows of data
(max of 2 decimal places) and my result is still the same. I even
pasted-special values ROUND after that and same result

How can that be?