Monday, 1 July 2013

information technolgy

Information technology
2nd week
3rd lecture
MS Excel: MOD Function (WS)
In Microsoft Excel, the MOD function returns the remainder after a number is divided by a divisor.

Syntax

The syntax for the MOD function is:
MOD( number, divisor )
number is a numeric value whose remainder you wish to find.
divisor is the number used to divide the number parameter. If the divisor is 0, then the MOD function will return the #DIV/0! error.
Worksheet Function Example
Let's take a look at an example to see how you would use the MOD function in a worksheet:
Based on the Excel spreadsheet above, the MOD function would return the following:
=MOD(A1, A2)
would return 2
=MOD(A1, A3)
would return -7
=MOD(34, A2)
would return 0
=MOD(34, 0)
would return #DIV/0!

Number - (required) the number being divided

Divisor - (required) the number by which you want to divide the Number argument

The Number argument can be a number entered directly into the function or a cell reference to the location of the data in a worksheet.

Note: the MOD function will return the #DIV/0! error value for the following conditions:

if a zero "0" is entered for the Divisor argument
if a cell reference to a blank cell is entered for the Divisor argument