Delving into Division

Problem

You already know how to perform normal division using the / operator, but need to perform other division operations, such as modulo division.

Solution

Use Excel's various division functions, which are summarized in Table 7-2.

Table 7-2. Common division functions

Function

Syntax

Description

MOD

=MOD(numerator,denominator)

Returns the remainder of numerator / denominator.

QUOTIENT

=QUOTIENT(numerator,denominator)

Returns the integer part of numerator / denominator.

GCD

=GCD(n1, n2, n3, ...)

Returns the greatest common divisor of the given integer numbers.

 

See Also

Excel also supports division of complex numbers. See Recipe 7.13 for more information. Take a look at Recipe 7.3 for a neat little trick you can do in Excel to quickly scale or shift a selected set of data.

Категории