Excel sages,
I've got a column with a list of numbers in ascending order. I'd like to make a formula for the second column that draws out only those numbers that are not divisible by previous numbers in the column. I am not looking for prime numbers. I'm just trying to check divisibility (with no remainder) against multiple cells. Because my column A is in ascending order, I figured I could make the formula simpler by making the "divisor" any previous cells.
I've created a mock-up to show what I'm going for:
(Column A)
Number list in ascending order
5
7
12
15
20
24
53
242
Because 15, 20, and 24 are divisible by either 5 or 12, I'd like them to be dropped from Column B, and would like Column B to show:
7
12
53
242
I tried the formula =IF(MOD(A9,(A2:A8))=0,"",A9) and pasted it in B9, but it returned #VALUE!
I've used the MOD=0 formula before, but only using a single divisor. I imagine I'm getting the error because I'm using a range of cells as the divisor. NOTE: I'd rather not do each cell as an individual formula because although I've made my data smaller here, in the actual worksheet there are hundreds of numbers. I attached a simplified Excel worksheet here.
Please help!
Thanks
J
Bookmarks