+ Reply to Thread
Results 1 to 14 of 14

Combination without Repetition

  1. #1
    Registered User
    Join Date
    01-16-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    5

    Combination without Repetition

    Hi,

    Kindly let me know how to create a list (I know how to calulate the count) of combinations without repetition when choosing 2,3,4 and 5 words from a set of 5 in Excel 2007.

    e.g. Alpha,Bravo,Charlie,Delta,End

    (AlphaBravo=BravoAlpha)

    Choosing 2 = 10
    Choosing 3 = 10
    Choosing 4 = 5
    Choosing 5 = 1

    Thanks in advance

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Combination without Repetition

    Hi amuizk
    I'm a little lost with your figures.
    can you explain more?
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    01-16-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Combination without Repetition

    Hi,

    Well I have a set of 5 words e.g Alpha, Bravo, Charlie, Delta, End and I want to creat a list of "unique" (combination AlphaBravo and BravoAlpha will not be unique so once AlphaBravo is generated BravoAlpha should not be generated) combinations while picking 2 out of 5 words, 3 out of 5 words, 4 out of 5 words and 5 out of 5 words.

    From maths I already know that when I pick for example 2 out of 5 words, I can have 10 combinations without repetition (Unique) i.e. 5C2 (5!/((5-2)!2!))

    Therefore I need to generate these combinations with a list in excel so that I can see what these possible combinations are and not only the count.

    I hope this explains.
    Attached Files Attached Files
    Last edited by amuizk; 01-17-2010 at 06:02 AM. Reason: Attachment

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Combination without Repetition

    Dude you just said the same thing

    two words ten combinations???
    five words one combination ???

    can you please expand on the above

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Combination without Repetition

    I get it now .appoligise it late .

    combine any of 5 of the words = Alpha,Bravo,Charlie,Delta,End =1

    I'm a little slow I'm Australian you know

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Combination without Repetition

    Dude
    you said there is a formula what would it be?
    =combin( 5,3)
    result five
    Last edited by pike; 01-17-2010 at 06:17 AM.

  7. #7
    Registered User
    Join Date
    01-16-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Combination without Repetition

    I have attached the Mathematical formula
    Attached Images Attached Images

  8. #8
    Registered User
    Join Date
    01-16-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Combination without Repetition

    There was somewhat a similar posting on the forum before

    http://www.excelforum.com/excel-work...binations.html

    Maybe this helps. I hope you have also seen the files Example.xlsx and Formula.jpg that I attached earlier

    Thanks in advance for your help

  9. #9
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Combination without Repetition

    yep fives not to bad the pattern will be
    something like for two numbers
    Please Login or Register  to view this content.
    can you see the pattern?

  10. #10
    Registered User
    Join Date
    01-16-2010
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Combination without Repetition

    Hi,

    I have found the macro that will solve my problem. I can get the list of combination of letters from this macro and then replce those letters with any words.

    http://www.ne.jp/asahi/math.edu/ami/myprog/jk_eng.htm

    Anyways thanks for your effort

  11. #11
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Combination without Repetition

    Ok but I will try to script something up for future reference as it is an interesting little puzzle
    Now that I've cracked the pattern

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Combination without Repetition

    If you're amenable to a VBA solution,
    Please Login or Register  to view this content.
    This lists zero-based indices, so you'd need to use a lookup function to convert the results to the names of the elements of your set. E.g., as the constants n and m are set, the output is

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  13. #13
    Registered User
    Join Date
    10-24-2012
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Combination without Repetition

    Hey shg, I'm trying to figure out how to use your macro. I have instances where I will have 3 items and will want the combinations of just grouping them into twos. I will also have instances where I have 5 items and I will want to get the outputs in combinations of 4, etc....

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

    Re: Combination without Repetition

    Newguy013,

    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]

+ 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