Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions > Maths and Trigonometry > 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".
     
  • If "divisor" = 0, then #DIV/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.

     EXAMPLES
     
     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) = #NUM!
    13=(2*134217728)-(INT((2*134217728)/1.1)*1.1) = 0.8
     

     Functions - M | Index - M | Office Online 

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.Top