MOD(number, divisor)

Returns the remainder after division.

number The number for which you want to find the remainder of.
divisorThe number you want to divide by.

Remarks

* The result of this function is the remainder when "number" is divided by "divisor".
* If "divisor" = 0, then #DIV/0! is returned.
* If "number" < "divisor", then "numbers is returned.
* If "number" is exactly divisible by "divisor", then 0 is returned.
* This function can be expressed in terms of the INT function: MOD(n, d) = n - (INT(n/d)*d).
* The result of this function has the same sign as the sign of the "divisor".
* A known bug with this function is when [ ("divisor" * 134217728) <= "number" ].
* In this case the function will return #NUM! instead of the correct remainder and you should use the equivalent formula above.
* In Excel 2010 the accuracy of this function was improved.
* The equivalent VBA function is MOD
* For the Microsoft documentation refer to support.office.com

 A
1=MOD(3,2) = 1
2=MOD(-3,2) = 1
3=MOD(3,-2) = -1
4=MOD(-3,-2) = -1
5=MOD(8,3) = 2
6=MOD(8,30) = 8
7=MOD(15.86,2) = 1.86
8=MOD(100,40) = 20
9=MOD(TRUE,TRUE) = 0
10=MOD(FALSE,FALSE) = #DIV/0!
11=MOD(20,0) = #DIV/0!
12=MOD(2*134217728,1.1) = 0.799999978325584
13=(2*134217728)-(INT((2*134217728)/1.1)*1.1) = £0.80


© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top