Problem subtracting cells in Excel 2000

  • Thread starter Thread starter Pher
  • Start date Start date
P

Pher

Hi everyone!

I think I´ve found a bug in Excel when trying to subract cells. I´
using Excel 2000 and this problem is also in 97.

When I try to subtract cells and they should return Zero, it doesnt i
some strange way.
However this works (=21,03-21,03=0) Returns TRUE
BUT if i use another cell doing som counting and the sum becomes 21,0
the subtraction does not return TRUE, but FALSE.

I have made an xls file explaining the problem.

http://hem.passagen.se/wwc/excel/problem_of_subtraction.xls

I would very much appriciate any help! Thanks, this must be a know
problem I guess? How do I get around it?

Excuse my bad spelling.. :-)

Regards Phe

Attachment filename: problem_of_subtraction.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=50062
 
Hi everyone!

I think I´ve found a bug in Excel when trying to subract cells. I´m
using Excel 2000 and this problem is also in 97.

When I try to subtract cells and they should return Zero, it doesnt in
some strange way.
However this works (=21,03-21,03=0) Returns TRUE
BUT if i use another cell doing som counting and the sum becomes 21,03
the subtraction does not return TRUE, but FALSE.

This is a well known issue and due to rounding and decimal storage of binary
numbers.

The solution is to either round your results to the desired precision before
doing the comparison, or build a small fudge factor into your comparison.

If you search the MSKB for "rounding errors" you will find a more detailed
explanation. Also a google search of this NG; and also www.cpearson.com have
more details.


--ron
 
Back
Top