Compare two numbers with two decimal digits?

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hi,

I have a number 2.0334 at Cell "A1",
I have aonther number 2.0335 at Cell "B1",

After I used the following formula at Cell "C1":
=IF((A1-B1)>=0,1,-1)

It results -1, but I want to get 1 which means I only want
to compare two numbers with two decimal places. Any
suggestions?

Thanks in advance for your help,
 
I just searched the Newsgroup and got an idea from one of
Tom Ogilvy's previous posts (Thanks Tom). Here is the
updated worksheet formula, it seems working fine.

=IF((FLOOR(A1, 0.01)-FLOOR(B1, 0.01))>=0,1,-1)

Please let me know if you have a better solution.

Thanks,
 
Back
Top