MOD function
Introduction
The MOD function is categorized under Excel Math and
Trigonometry functions. The function helps find a remainder after a number
(dividend) is divided by another number (divisor). As a financial analyst, the
function is useful when we need to process every nth value. For
example, if our data comprises several columns of numbers, we can use MOD to
sum every nth column. The Excel MOD function returns the remainder
of two numbers after division. For example, MOD(10,3) = 1. The result of MOD
carries the same sign as the divisor.
Purpose
Get the remainder from division
Return value
The remainder
Syntax
=MOD (number, divisor)
Arguments
· number - The number to be divided.
· divisor - The number to divide with.
Usage notes
Use the MOD function to get a reminder after division. For
Example, MOD (3,2) returns 1, because 2 goes into 3 once, with a remainder of
1. Examples, Here are a few examples of the MOD function with hardcoded values:
=MOD(12,3) // returns 0
=MOD(12,5) // returns 2
=MOD(100,33) // returns 1
=MOD(6.25,1) // returns 0.25
Alternative formula
With very large numbers, you may see the MOD function return
a #NUM error. In that case, you can try an alternative version based on the INT
function:
=number-(INT(number/divisor)*divisor)
Notes
·
MOD is often seen in formulas that deal with
"every nth " value
·
MOD is useful for extracting the time from a
date
·
MOD always returns a result in the same sign as
the divisor.
·
MOD will return a #DIV/0! error if the divisor
is zero
Comments
Post a Comment