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

Hi!

It's rounding issue of the MOD function

Try this:

=MOD(ROUND(A1*100,0),10)

Biff

"Marian Megami V" wrote in message
...
Excel 2003. Input in B1:
=MOD(A1*100,10)

Input in A1:
622.2 --

The result is something very small but not 0 as it's supposed to be.
Input 622.8 and there it comes all right. For some strange reason, it
would
seem like numbers less than 512 with one decimal - they compute correctly.

Interesting still:
655.1 goes wrong and 655.4 goes ok.

Remark: if I try with pre-multiplied numbers everything's fine. So if I
say:
=MOD(A1,10) where A1=65510
it gives clean 0.

If I'm wrong somewhere in operator precedence or something, please relieve
me of this pain. I have created a ton'of page report and everywhere's this
issue.

Didn't know where to write to Microsoft bug-report or something. Thank you
in advance.