GCD

Returns the greatest common divisor of one or more integers.

Sample Usage

GCD(6,12)
GCD(C5:C7)

Syntax

GCD(value1, [value2,..])

  • value1 - The first number or range to consider while calculating GCD.
  • value2,.. - [OPTIONAL] Additional numbers or ranges to calculate for the GCD.

 

Examples

GCD(6,12) returns 6, which is the .
GCD(C5:C7) returns the greatest common divisor of the numbers contained in the range C5:C7.

Notes

  • Decimal inputs will be truncated. 
  • If any argument is nonnumeric, GCD returns the #VALUE! error value.
  • If any argument is less than zero, GCD returns the #NUM! error value.