Mr. GillesD, a few posts down below is your resolution for eliminating combos from different groups of numbers. Your proposed key solution is If Not (B <= 5 And C >= 6 And D <= 10 And E >= 11) Then for rejecting the combinations with exactly 2 numbers in (1, 2, 3, 4, 5), 2 numbers in (6, 7, 8, 9, 10 ), and with 2 numbers in (11, 12, 13, 14, 15). Here, all numbers are < 15 and distributed in groups that accept procedure B <= 5 And C >= 6 , for example. I’m a bit confused with this solution because I can’t imagine how may look a similar code (or part of the macro - macro’s lines) for some other exclusions. For illustration, if I use your previously posted macro that makes all possible combinations for 6/49 and want to eliminate combos with exactly 2 numbers from (7, 15, 19,20), with 3 numbers from (1,12,13, 17, 18, 32, 35, 47,49) and one number from (2,4,8,15,33). Example for a combination that should be eliminated is 7,19,32,33,35,49. Here, I’m interested only in the macro’s line that eliminate these certain combinations like a line If Not (B <= 5 And C >= 6 And D <= 10 And E >= 11) Then in the earlier solution, since you already posted a VBA macro that makes all possible combos for 6/49.