Wrong result of GCD function in Excel

Hello,

I occasionally find an error on the GCD function in Excel 2013

to find greatest common divisor from 2 numbers which are results of COMBIN by GCD formula, it gives wrong result.

Can anyone check for the reason?

Example:

  • A = COMBIN(9, 4) = 126
  • B = COMBIN(10, 6) = 210
  • If i use GCD(A, B), the result is 1 while it must be 42.
  • if use the GCD formula directly with the number (not reference), it gives right result GCD (126, 210) = 42

does anyone explain to me? or is it the bug from Excel

Thank you

DanDC


  • Edited by DanDC Monday, May 25, 2015 5:38 PM
May 25th, 2015 5:37pm

Hi DanDC,

As far as I know, this is a known issue in excel. Combin function returns the number of combinations for a given number of items. Use COMBIN to determine the total possible number of groups for a given number of items. So this might be caused by returning the result of Combin function didnt as integer.

To solve this issue, we can use INT function to convert the results as numbers.

= INT(COMBIN(10, 6))

Hope its helpful.

Regards,

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
May 26th, 2015 5:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics