View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Sum - Sum < Zero ??? How is it? Bug in Excel formula?

Not just an excel feature, but a well documented issue with binary fractions.
Basically, some decimals cannot be represented exactly in binary (same way
1/3 cannot be represented exactly as a decimal - using base 10 anyway).

More he
http://cpearson.com/excel/rounding.htm

Also, if you search on this site, you should find several threads on this
issue w/explanations from folks who are much more knowledgeable than I (Jerry
Lewis had some good posts on this).

My suggestion is to use the Round function whenever you use a conditional
statement involving numbers that are or could be decimals.


"danieldc" wrote:

Hi, I just found this "feature" at Excel formulas today.

Please, have a look at: http://danielgudang.multiply.com/journal/item/192
(in portuguese, but images show all)


Let me explain:


some cell C1 = sum (C2:C5)
some cell D1 = sum (D2:D5)
some cell E1 = sum (E2:E5)


A1 = C1 - D1 - E1
B1 = C1 - (D1 + E1)


A1 = B1 ??? Oh, not always!


Sometimes A1 will be +0, sometimes -0.


Really strange!