Re: Mod operator
From: Myrna Larson (anonymous_at_discussions.microsoft.com)
Date: 09/02/04
- Next message: mcadle: "Re: copy cell contents to a textbox > 255 characters"
- Previous message: Myrna Larson: "Re: How can I use Analysis Toll Pack functions in VBA?"
- In reply to: R Avery: "Mod operator"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 01 Sep 2004 21:03:39 -0500
Some implementations of MOD work differently when the arguments have different
signs. The worksheet function uses the definition that the modulus is always
positive, i.e. =MOD(-10,3) yields -4 with a remainder of 2. OTOH, in VBA,
definition that's used is probably what you division in grade school: -10
divided by +3 is -3 with a remainder of -1.
On Wed, 01 Sep 2004 10:08:40 -0400, R Avery <ravery74@yahoo.co.uk> wrote:
>How come the Mod operator can return negative values? I've always
>wondered why.
- Next message: mcadle: "Re: copy cell contents to a textbox > 255 characters"
- Previous message: Myrna Larson: "Re: How can I use Analysis Toll Pack functions in VBA?"
- In reply to: R Avery: "Mod operator"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|