TX Sheet Control

GCD Function

Function

Return the greatest common divisor of integers, the largest integer that divides all of them without a remainder. number1, number2 and up to 255 numbers or arrays are the values; decimals are truncated to integers. A negative number returns #NUM!, and text that is not a number returns #VALUE!.

Syntax

GCD(number1, number2)

Category: Math. Minimum arguments: 1. Maximum arguments: 255.

Available for supported offline calculation.

Examples

=GCD(12,18)

The formula returns 6.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

See Also