# Use Excel to build 7 digit number combinations

1. ## Use Excel to build 7 digit number combinations

I have a series of 9 numbers that I think are highly likely to be picked in a random draw. What formula can I use in excel to build 7-digit combinations of these 9 numbers so that every combination is selected?

5,7,8,13,15,26,35,38

2. ## Re: Use Excel to build 7 digit number combinations

Do you mean that you want any 7 numbers out of the nine (although you have only listed 8 numbers)? It is confusing to refer to 7-digits, as a digit is a single number.

Pete

3. ## Re: Use Excel to build 7 digit number combinations

The objective is to get every 7 number combination from the list of 9 numbers (5,7,8,13,15,26,35&38). The draw will only pick 7 numbers from the list of 9 (each number will not be replaced). Does that help?

4. ## Re: Use Excel to build 7 digit number combinations

Originally Posted by Parka
The objective is to get every 7 number combination from the list of 9 numbers (5,7,8,13,15,26,35&38). The draw will only pick 7 numbers from the list of 9 (each number will not be replaced). Does that help?
Did you read Pete's post? You repeat 8 number as list of 9 numbers.

5. ## Re: Use Excel to build 7 digit number combinations

I am not aware of a single, simple formula for this kind of thing.

It seems that most attempts at generating combinations/permutations involve nested For...Next loops.
``Please Login or Register  to view this content.``
I tried setting up a spreadsheet to do it with just spreadsheet functions here: https://www.excelforum.com/tips-and-...thout-vba.html It works pretty well for permutations. When I have thought about using this to generate combinations without repeats, I usually end up with something that generates every permutation then uses appropriate functions/logic to reject permutations that don't match the desired conditions. Recognize that, if pick 7 from 9 yields more than 1E6 possible permutations, it won't readily fit on a single tab/sheet because there are only about 1E6 rows to a spreadsheet (you may need to use multiple columns/tabs/sheets).

It's not a specific solution to your specific scenario, but I would expect to adapt one of those approaches to your problem.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1