Documentation/Calc Functions/LCM EXCEL2003
The result is the lowest common multiple of a list of numbers.
LCM_EXCEL2003(Number 1 [; Number 2 [; … [; Number 255]]])
Returns an integer which is the least common multiple of two or more integers passed as input.
Number 1, Number 2, … , Number 255 are numbers, references to cells or to cell ranges of numbers.
- If any argument is negative, the function returns an error value.
- If any argument is non-integer, the function returns an integer LCM value by truncating the input numbers i.e. taking their floor values. For e.g. LCM_EXCEL2003(2.5;5.2) will return 10 while LCM_EXCEL2003(8.4;5.2) will return 40.
The functions whose names end with _ADD or _EXCEL2003 return the same results as the corresponding Microsoft Excel 2003 functions without the suffix. Use the functions without suffix to get results based on international standards.
Note that if given two numbers, a*b=LCM(a;b)*GCD(a;b).
|=LCM_EXCEL2003(16;32;24)||the least multiple common to 16, 24 and 32||96|
|=LCM_EXCEL2003(B1:B3) ,where cells B1, B2, B3 contain 9, 12, 9||the least multiple common to 9, 12 and 9||36|
|=LCM_EXCEL2003(-16;32;24)||function returns an error value since one of the arguments is negative||Err:502|
Related LibreOffice functions:
Equivalent Excel functions: