Closed Thread
Results 1 to 7 of 7

Formula (or macro?) to show all number combinations

  1. #1
    Registered User
    Join Date
    05-12-2005
    Posts
    28

    Formula (or macro?) to show all number combinations

    as an example i will use the national lottery. numbers 1 to 49 inclusive.
    i need a formula that will list all the possibile 6 number combinations not repeating any.

    calling all wizards

    thanks in advance

  2. #2
    Registered User
    Join Date
    10-29-2007
    Posts
    38
    I am no Harry potter but can say your thread title is poor. Why do you want to do this? Do you realise you will get 14 million combinations?
    Richard Walker

    For training and consultancy visit www.imits.co.uk

  3. #3
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    you can use 6 nested do-loops in a macro, building in a check for repetition of one or more numbers.

    It is 17 million combinations - where will you put them. You will need to employ 500 people to fill your slips in and take them to 500 outlets to register them.

    you cannot enter every combination, so leave out 44 45 46 47 48 49

  4. #4
    Registered User
    Join Date
    10-29-2007
    Posts
    38
    Christ your lottery is even more stacked against me than camelots. When I bang the n's and k's I always get to 14 million.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,704
    Hello jhill,

    As Badger101 indicates, please try to make your thread titles indicative of your specific problem - I've changed it for you.

    As also pointed out above, difficult to do with a formula, if you want to try VBA see VoG's offering here

  6. #6
    Registered User
    Join Date
    05-24-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Formula (or macro?) to show all number combinations

    hi just another question as this is related and some of you might know the answer, is there some sort of software that allows you too enter number combinations and the generator/software finds the missing combination which hasnt been used?

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Formula (or macro?) to show all number combinations

    danmarket1,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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