MOD

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".
* The result of this function has the same sign as the sign of the "divisor".
* If "divisor" = 0, then #DIV/0! is returned.
* If "number" < "divisor", then "number" 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 Excel calculation is different to the VBA calculation so you can get different answers.
* In Excel 2010 the "number" and "divisor" arguments can take larger values.
* The equivalent VBA operator is VBA.MOD
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 A
1=MOD(3, 2) = 1
2=MOD(-3, 2) = 1
3=MOD(3, -2) = -1
4=MOD(-3, -2) = -1
5=MOD(2, 3) = 2
6=MOD(3, 3) = 0
7=MOD(8, 3) = 8-(INT(8/3), 3) = True
8=MOD(8, 30) = 8
9=MOD(-30, 28) = 26
10=MOD(30, 28) = 2
11=MOD(15.86, 2) = 1.86
12=MOD(100, 40) = 20
13=MOD(TRUE, TRUE) = 0
14=MOD(2 ^ 31, 7) = 2
15=MOD(FALSE, FALSE) = #DIV/0!
16=MOD(20, 0) = #DIV/0!

1 - What is the remainder when you divide 3 by 2.
2 - What is the remainder when you divide -3 by 2.
3 - What is the remainder when you divide 3 by -2.
4 - What is the remainder when you divide -3 by -2.
5 - What is the remainder when you divide
6 - What is the remainder when you divide
7 - What is the remainder when you divide
8 - What is the remainder when you divide
9 - What is the remainder when you divide
10 - What is the remainder when you divide
11 - What is the remainder when you divide
12 - What is the remainder when you divide
13 - What is the remainder when you divide
14 - What is the remainder when you divide
15 - What is the remainder when you divide
16 - What is the remainder when you divide

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