next up previous contents index
Next: MODE Up: A. Function Reference Previous: MMUL   Contents   Index


MOD

Syntax: MOD(X, Y)

X = a numeric value
Y = a numeric value

MOD returns the remainder of X/Y with the same sign as X. (This function is NOT modulus as sometimes documented.)

Examples:

MOD(8, 4) = 0

MOD(D2, F3) = 12, where D2 = 100 and F3 = 44

MOD(F5, A1) = Error - divide by zero, where F5 = 98.6 and A1 = 0

MOD(-14, 3) = -2 (the true modulus is 1)

Excel function: (see MODULUS, XLMOD)


next up previous contents index
Next: MODE Up: A. Function Reference Previous: MMUL   Contents   Index
SpreadScript User's Guide, Version 1.2
Grey Trout Software
02 March 2003