+ Reply to Thread
Results 1 to 6 of 6

how to generate combinations in excel

  1. #1
    Registered User
    Join Date
    07-20-2010
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    1

    Unhappy how to generate combinations in excel

    I want to generate all possible combinations of 11 combination 4. I know there are 330 possible combinations but how can i let excel generate all the combinations. 1-11 combination 4.

    For example. 1 2 3 4 5 6 7 8 9 10 11 taking 4 at a time:
    1234
    1235

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

    Re: how to generate combinations in excel

    is this letters or numbers?
    there is a handy tool here
    http://www.ne.jp/asahi/math.edu/ami/myprog/jk_eng.htm
    although it specifies letters you can use 0-9 as well

    there is also this code from myna larson
    put C in A1 (c for combinations p for permutations).
    4 in A2 ((the number of combinations you want)
    1-11 in A3:A13 (or 11 diferent text items if you want)

    run the macro ListPermutations a new sheet will be added with all the combinations.

    note apparently in excel 2007 you need to replace
    Please Login or Register  to view this content.
    with this
    Please Login or Register  to view this content.
    this is the full code
    Please Login or Register  to view this content.
    Last edited by martindwilson; 07-20-2010 at 07:34 AM.
    "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

  3. #3
    Registered User
    Join Date
    01-21-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: how to generate combinations in excel

    The code in this article can intake upto 8 characters and generates all possible words. Same way, you can input the numbers in this input and get possible combination of numbers. This is kind of Brute force basic algorithm, used for Word combination generator as well. Click here to check the article.

  4. #4
    Registered User
    Join Date
    01-21-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: how to generate combinations in excel

    The code in this article can intake upto 8 characters and generates all possible words. Same way, you can input the numbers in this input and get possible combination of numbers. This is kind of Brute force basic algorithm, used for Word combination generator as well. Click here to check the article.

  5. #5
    Registered User
    Join Date
    01-21-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: how to generate combinations in excel

    The code in this article can intake upto 8 characters and generates all possible words. Same way, you can input the numbers in this input and get possible combination of numbers. This is kind of Brute force basic algorithm, used for Word combination generator as well. Click here to check the article.

  6. #6
    Registered User
    Join Date
    01-21-2014
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: how to generate combinations in excel

    The code in this article can intake upto 8 characters and generates all possible words. Same way, you can input the numbers in this input and get possible combination of numbers. This is kind of Brute force basic algorithm, used for Word combination generator as well. Click here to check the article.

+ Reply to 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