문제

I have an Excel validation formula which worked fine in Office '03, '07, but is failing in 2010. Did they change the definition of MOD recently?

In 03/07 the following returns zero:

=MOD(1, .05)

However in 2010 it returns .05.

As far as I can tell they haven't changed how remainders worked since I was in 3rd grade when I learned about them. However, Microsoft may be taking certain liberties.

도움이 되었습니까?

해결책 2

So I finally decided the best way to determine this was to cheat and do:

=(1/.05)-(floor(1/.05))

That gives me the zero I need.

다른 팁

Actually... it does not return zero in Office 2007, but -0.000000000000000056 (just tested).

Maybe it's a floating point issue or the way Excel 2010 handles floating point changed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top