Written by Allen Wyatt (last updated September 30, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and 2021
Remember your junior-high math classes? The teacher would write three or four numbers on the chalkboard and ask you to determine what larger number each of the numbers on the board could be a factor of. For instance, if the numbers were 2, 3,and 4, then they are all factors of the number 12. Thus, 12 is the least common multiple of those three numbers.
Things got really difficult when the teacher threw up six, seven, or ten numbers. Yikes! Fortunately, Excel makes calculating the least common multiple rather easy. All you need to do is put the numbers in a range of cells, and then use a formula like this:
=LCM(C20:C23)
In just a jiffy Excel returns a value that, sure enough, would have made that math teacher proud.
Just one gotcha here: If you use non-integer values with the LCM function, everything past the decimal point is ignored. In other words, the values are truncated before LCM does its magic. So, the bottom line is to make sure you are working with actual integers with LCM.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (5833) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Excel here: Determining the Least Common Multiple.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Excel includes a handy function that allows you to repeat characters or strings of characters. How you use the REPT ...
Discover MoreGrading in schools is often done using numeric values. However, you may want to change those numeric values into letter ...
Discover MoreUsing the UNIQUE function you can derive unique values from a range of cells. By expanding the range of cells accessed by ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-09-30 10:26:18
J. Woolley
The Tip's example can also be entered like this:
=LCM(C20,C21,C22,C23)
or any related comination.
You might also be interested in the greatest common divisor:
=GCD(...)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments