Vivek Verma
  • Home
  • Portfolio
  • Resume
  • Blog
  • Technical Reference
  • Contact Me

GCD

GCD

Returns the greatest common divisor of two or more integers. The greatest common divisor is the largest integer that divides both number1 and number2 without a remainder.

If this function is not available, run the Setup program to install the Analysis ToolPak. After you install the Analysis ToolPak, you must enable it by using the Add-Ins command on the Tools menu.

Syntax

GCD(number1,number2, ...)

Number1,number2, ...   are 1 to 29 values. If any value is not an integer, it is truncated.

Remarks

  • If any argument is nonnumeric, GCD returns the #VALUE! error value.
  • If any argument is less than zero, GCD returns the #NUM! error value.
  • One divides any value evenly.
  • A prime number has only itself and one as even divisors.

Examples

GCD(5, 2) equals 1

GCD(24, 36) equals 12

GCD(7, 1) equals 1

GCD(5, 0) equals 5

I Would Love to Have You Visit Soon!

  • Home
  • Portfolio
  • Resume
  • Blog
  • Technical Reference
  • Contact Me