Finding Lowest Common Multiple for a set range that could have multiple scenarios of empty cells

PNuff

New Member
Joined
Dec 6, 2017
Messages
7
Office Version
  1. 365
Hi - I'm looking to find the Lowest Common Multiple of a set range containing 12 side by side cells. However, those twelve cells are user inputted, and all 12 cells may not get populated. Sometimes, for example, only cells 3, 5 and 7 will get an integer, and other times cells 8, 9 and 10 will get an integer. Sometimes, all 12 cells will get an integer. No matter what the input, it will always be integers. Note that sometimes the 12th (last) cell will be empty.

The LCM function does not like empty cells. I've tried some CountIFs and some other rudimentary combinations when it only needs to grab a few cells from the range of 12, but the LCM does seem to want to work with other formulas...

Any ideas would be appreciated.

Thanks!

Pete
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hello Pete, welcome to MrExcel

Try this array formula to ignore blanks - assumes data in A1:A12

=LCM(SMALL(A1:A12,ROW(INDIRECT("1:"&COUNT(A1:A12)))))

confirm with CTRL+SHIFT+ENTER<strike></strike>
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top