View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default the decimals extends after the sum function

"hou" wrote:
when I use the Sum function to calculate about 10,000 numbers, which have
been rounded to 2 decimals (using the round function in excel), the result
of
sum came out with more than 2 decimals.


The short answer is: you need to round the sum to 2 decimal places as well.


I find that an interesting thing, the sum of Group A has two decimals,
the same with Group B.


Just a coincidence. In fact, even those numbers are probably not accurate
to 2 decimal places. It just appears that way.


I don't know why


In general, numbers with decimal fractions cannot be represented exactly
because of the way that Excel (and most applications) do arithmetic on
binary computers. For more information, you might look at
http://support.microsoft.com/kb/78113 .


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

"hou" wrote:
when I use the Sum function to calculate about 10,000 numbers, which have
been rounded to 2 decimals (using the round function in excel), the result
of
sum came out with more than 2 decimals. It is eight decimals!
I don't know why, and I split the numbers into several groups. I find that
an interesting thing, the sum of Group A has two decimals, the same with
Group B. But when I calculate the sum of the two groups, the result also
came
out with 8 decimals!!!...