Hello to you all,
No need to apologise Drew, I just wanted to underline that there is a few women out there that enjoy racking their brains trying to solve problems and I just happen to be one of them.
I left Melbourne, 2 years ago for the sunny Queensland (Gold Coast). No regrets so far.
Gene,
From my trial:
mod(125,7)
Mod formula in Excel accept decimal in both parameters and doesn't round up.
if 1st parameter is smaller then 2nd parameter, whatever the second is, it will return the first one without rounding if decimal.Ie: mod(3.29,6.45) =3.29
The result of mod in excel can be decimal.
mod in VBA125 mod 7
VBA seems to returns the first parameter if first parameter smaller then second. The problem is the rounding in VBA:
It seems that vba mod round up if decimal used, everything over the.5.
6 mod 6.49 will result in 0 (6.49 is rounded down)
6 mod 6.51 will result in 6 (6.51 is rounded up to 7 so first parameter returned)
now 6.41 mod 9.51 will result in 6 (1st parameter rounded down)
now 6.51 mod 9.51 will result in 7 (1st parameter rounded up)
Interesting there is no constitency between a formula in Excel and equivalent in VBA and can result in weird answers.