Home  >  Article  >  Topics  >  What is the use of mod function in excel?

What is the use of mod function in excel?

尚
Original
2020-04-27 10:38:399687browse

What is the use of mod function in excel?

The mod function is a remainder function, its format is: mod(nExp1,nExp2), which is the remainder after dividing two numerical expressions. The sign of the result is the same as the divisor.

Syntax

MOD(number, divisor)

MOD function syntax has the following parameters:

  • Number Required. The dividend to be calculated as the remainder.

  • Divisor Required. divisor.

Note:

If the divisor is 0, MOD returns #DIV/0! .

MOD function can be expressed by borrowing INT function:

MOD (n,d) = n-d * INT (n/d)

Example:

MOD(3, 2) is equal to 1

MOD(-3, 2 ) is equal to 1

MOD(3, -2) is equal to -1

MOD(-3, -2) is equal to -1

MOD(-3, 0) is equal to -3

MOD(3, 0) is equal to 3

MOD(2, 0) is equal to 2

MOD(4, 3) is equal to 1

Recommended learning: Excel Basic Tutorial

The above is the detailed content of What is the use of mod function in excel?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn