Dear Experts
The actual value of variable C is 22 but here it displays 2.![]()
Please Login or Register to view this content.
Range("a14") must display 965-22
What is wrong?
Please help
Dear Experts
The actual value of variable C is 22 but here it displays 2.![]()
Please Login or Register to view this content.
Range("a14") must display 965-22
What is wrong?
Please help
There is actually a bug in the VBA MOD function, in that it converts both values (the number and divisor) into integers prior to determining the MOD result. ( See http://www.bygsoftware.com/issues/modbug.html )
Instead of your 'c = a Mod 37.324' line, use this instead:
![]()
Please Login or Register to view this content.
Last edited by Paul; 06-07-2007 at 02:58 AM.
Mod works only with integer values, it rounds 37.324 to 37 and give you the same result than '36040 mod 37'.
You can change your code:
with:![]()
Please Login or Register to view this content.
Regards,![]()
Please Login or Register to view this content.
Antonio
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks