View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Excel 2003 Calculation Problems

I missed answering the question

=ROUND(MOD(F17-F18,F21),1)

Mike

"Mike H" wrote:

How do I fix it?



You don't it's not broken

The modulus is what's left over after division so

=MOD(F17-F18,F21)

should return zero compared to

=(F17-F18)/F21 which returns 5

The formula

=MOD(F17-F18,F21) if set to lots of decimal places returns

-0.0000000000000568434

which is near as dammit zero with the diference being caused by excel
conversions between binary and decimal where often there is no precise binary
representation of a number.

Mike

"ak_edm" wrote:

I have Excel 2003 (11.8237.8221) SP3 according to the ABOUT screen in the
HELP menu. The three numbers and their cell locations a

F17 = 1887.36
F18 = 314.56
F21 = 314.56

Note that 314.56 x 6 = 1887.36, so why is this happening?

The formula =(1887.36-314.56)/314.56 equals 5
but the formula =MOD(1887.36-314.56,314.56) equals -5.68434E-14

(for this next one I formatted the digits in the Excel cell as far as I
thought good)
The formula =(F17-F18)/F21 equals 5.000000000000000
but the formula =MOD(F17-F18,F21) equals 0.000000000000171

Why?
How do I fix it?

- Eric