Thread: Mod function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Mod function

You decide which explanation is best:-

http://mathforum.org/library/drmath/view/52343.html
http://support.microsoft.com/kb/141178

Mike

"Carl" wrote:

The VBA "x Mod y" function and the Excel function =Mod(x,y) produce
consistent results when both parameters are positive. When the number, x, is
negative, these two functions produce different results.
For example the VBA function returns
- 1 = -1 Mod 3
and
the Excel function returns
2 = Mod(-1, 3)

I agree with the Excel function's results.

Anyone have any idea why these functions would have different results?