Ok, here is how I would list all the possible selection of 7 numbers from 1-49. Your post #1 indicates you expect 13million results, and that is far too low. I ran this macro and stopped it at 49million and growing. So, even with this technique, it will take a while.
Your original macro was actually writing out each combination to the worksheet one at a time. That will take forever. This method builds a list of 65000 results in memory, then writes them all out at once. Then repeats. So even with 100s of millions of results it will be 65000 times faster.
Also, your original macro limited to 65k rows I presume to maintain Excel 2003 compatibility, but your macro would run out of columns pretty fast. This new version will keep adding sheets as needed until it is done.
Bookmarks