+ Reply to Thread
Results 1 to 12 of 12

Generating Permutations and Combinations

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Generating Permutations and Combinations

    Hi Forum,

    Need help to generate Series of Items in different Permuation & Combinations..

    For Ex:- If there are three Items.. A B C and forming a group of 2
    then the the total no of combinations would be permut(3,1) = 6...

    I need this to be shown as follows depending on the no of itmes and no of group no=2 in this case...

    Permuations & Combinations are as follows:

    AB
    AC
    BC
    CA
    CB
    BA
    Attached Files Attached Files

  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: Generating Permutations and Combinations

    try this
    http://www.ne.jp/asahi/math.edu/ami/myprog/jk_eng.htm
    having said that i notice your other thread was locked beacause of the title
    and to be truthful i cant see a lot of difference between that title and this one!
    Last edited by martindwilson; 06-27-2009 at 02:20 PM.
    "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
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Generating Permutations and Combinations

    You are right..!
    Martin..there's little difference in both the threads as the "Need Help " is taboo i did away with it and retained the rest and as far as the explanation goes, I think that was not much of rule-breaker so I stayed with the same..

    Thanks a lot for the solution, that file's amazing , but the only difficulty I am facing is to get a Permutations and Combinations of Proper Nouns or Words..

    Likes Lets say Jack,Jill and Jane..

    It considers all the individual alpahabets and not the words seperately., though I do admit in the example mentioned I had taken only Single-Alphabets as It would have been tedious to put names and show their Permutations and Combinations even in the example..

    So can anything be done about the same...

    Warm Regards
    e4excel

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

    Re: Generating Permutations and Combinations

    it works with numbers0-9 as it treats them just as characters so put in numbers to = your text
    say 1.2.3 for jane.mick.bob
    then use find replace replace 1 with jane and so on.

  5. #5
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Generating Permutations and Combinations

    Quote Originally Posted by martindwilson View Post
    it works with numbers0-9 as it treats them just as characters so put in numbers to = your text
    say 1.2.3 for jane.mick.bob
    then use find replace replace 1 with jane and so on.
    THanks a Lot Martin...
    I shall tryth that but does that mean I can only try 0-9 items only what If I were to try for A Cricket Combination comprising of 11 team players like which team would be better of the Selection of 15 members..

    This file's good but is there a Non-VBA solution which can be personlized or tailor-made file which can be tweaked for one's requirement..

    Thanks...

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

    Re: Generating Permutations and Combinations

    there are plenty of other characters !"£$%^&*()_+ to use!
    id suges you use that
    then text to columnd to soplit then find replace.

  7. #7
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Generating Permutations and Combinations

    Dear martin,

    Yes I would need to anyways use that "Text To Columns" options but is there a Formula Type Solution wherein I make the File ready and Just allot Cell-Spaces to put the Items and No of Items and the Required Permutation and Combination appears below..

    What Im trying to make a file which takes atleast 15 Items and then Displays the Permutation and Combination below..

    If there is I really would appreciate help on the same and otherwise the file provided is indeed very good...

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

    Re: Generating Permutations and Combinations

    youd have trouble with permutations your spread sheet would run out of rows on large ones.
    i dont know if there is a formula solution but if there is it would prob take ages to calculate
    last time we had a similar question
    SHG had a solution

  9. #9
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Generating Permutations and Combinations

    Quote Originally Posted by martindwilson View Post
    youd have trouble with permutations your spread sheet would run out of rows on large ones.
    i dont know if there is a formula solution but if there is it would prob take ages to calculate
    last time we had a similar question
    SHG had a solution
    Any possiblity of getting that solution or the link for that Query where SHG had offered a solution...

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

    Re: Generating Permutations and Combinations

    no idea mate,youd have to do a search ane trawl through his posts!

  11. #11
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Generating Permutations and Combinations

    Not that I had not tried but in a similar query, SHG had removed the attachment and other files are slightly different from my requirement..

    But anyways thanks a lot that file's still very good but it could have been an icing over the cake if it had been in a Formulaic solution...

  12. #12
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Generating Permutations and Combinations

    Just saving some useful link...
    http://www.j-walk.com/ss/excel/tips/tip46.htm
    Last edited by e4excel; 02-25-2011 at 03:31 PM.

+ 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