The DIVIDE function performs a division by returning Blank or an alternative result if the denominator is zero.
DIVIDE(
numerator,
denominator
[, alternate_result]
)
- numerator: Dividend or numerator of the division.
- denominator: Divisor or denominator of the division.
- alternate_result: Optional argument. Value to return in the event that denominator takes the value zero.
The DIVIDE function returns a real number.
If the alternate_result argument is not included, the function will return Blank in the event of a division by zero. alternate_result must be a constant numeric value (if you try to return a text string or a Boolean, the function returns an error).
In the following example, several pairs of numbers are divided, indicating the value zero as an alternative result:
In this second example, the same pairs of numbers are divided without indicating an alternative result. The DIVIDE function, in these circumstances, returns Blank when it finds a division by zero: