Strange subtraction result!


Posted by Stephanie Lee on April 10, 2001 10:33 AM

Cell A1=.07-.06 (=.01)
Cell A2=.06-.05 (=.01)
Cell B2=A1-A2 and the result of B2 is not zero!

(This is so strange)

What's going on?

Posted by gregc on April 10, 2001 10:36 AM

If you have the cells formatted for two decimal places and the math actually comes to more than two decimal places (you don't see them, but excel does), you will get the answer you don't want. You have to round the cells to two decimal places before the math happens.

Posted by Mark W. on April 10, 2001 10:50 AM

For explanation...

see...

http://support.microsoft.com/support/kb/articles/Q78/1/13.ASP?LN=EN-US&SD=gn&FR=0&qry=subtraction%20error&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=XLW97



Posted by Stephanie Lee on April 10, 2001 11:48 AM

Re: For explanation...

Yes, thank you! So, it is a binary conversion problem...