+ Reply to Thread
Results 1 to 5 of 5

List all combinations from 1 to 45

  1. #1
    Forum Contributor
    Join Date
    11-06-2012
    Posts
    139

    List all combinations from 1 to 45

    Hi,

    This about an exercise, we need to visualize all possible combinations for a lottery.

    The question is:

    Can somebody make a VBA code which writes down all possible 6-combinations from 1 to 45.

    But i would like to add a colour. And these folowing colours for each number combination.
    1 rood
    2 geel
    3 groen
    4 blauw
    5 oranje
    6 paars

    It should be around the 40.000.000 combinations.
    I added an excel sheet to give an example. But it is to much to do by hand.

    Thnx
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: List all combinations from 1 to 45

    Just to add: if one combination takes only 1 ms that's 40.000 seconds - more than 11 hours

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: List all combinations from 1 to 45

    well its not THAT bad as there are only
    8145060
    combinations 6/45
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    11-06-2012
    Posts
    139

    Re: List all combinations from 1 to 45

    That's pretty long....

    But i have to, so is their a VBA code to do this?
    Last edited by a1b2c3d4e5f6g7; 07-21-2014 at 06:55 AM.

  5. #5
    Forum Contributor
    Join Date
    11-06-2012
    Posts
    139

    Re: List all combinations from 1 to 45

    Hi,

    I think this would be the code for numbers, but i need to add the colors to each combination.

    Please Login or Register  to view this content.
    Can somebody add this in this VBA code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need a list of combinations
    By Iduno in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-18-2013, 11:11 AM
  2. list possible combinations of 6 from 22
    By nlscarter in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-19-2013, 10:13 PM
  3. [SOLVED] List all combinations
    By olives in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 02-12-2013, 01:23 AM
  4. List Possible Combinations
    By Rizzle in forum Excel General
    Replies: 10
    Last Post: 09-29-2010, 09:36 AM
  5. [SOLVED] List all possible combinations
    By Spencer Hutton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2005, 04:06 PM

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