View Single Post
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 20 Jun 2005 19:11:02 -0700, KRAMER
wrote:

Hi Guy's,

I don't know if I've done something wrong or what, but, I have a sum in one
book and a different sum in another. I am using the IF function to basically
tell me when the two results differ. Now the results are the same e.g.
"$70.65" but the function =IF(H22=[book1]jun!D22," ","check book1jun") is
showing false when I know that both cells equal "$70.65". I double checked by
removing the sum from cell H22 and typing 70.65 (formatted as currency of
course) and the function then says true. I am using IF function to match
other sum results and no problem.
Pease help I am really freaked about this!!


Well, both cells really do NOT equal $70.65

Excel (as well as other spreadsheet programs) does NOT have infinite precision.
Also, many numbers cannot be expressed exactly in binary (much like the
fraction 1/3 cannot be expressed exactly in decimal, but rather is equal to
0.3333333...)

The fix for this normal Excel behavior is to round your results at some point
prior to your testing.

For a more in depth discussion, see http://www.cpearson.com/excel/rounding.htm
or search the archives. The issue appears in this NG at least once or twice a
week.


--ron