+ Reply to Thread
Results 1 to 7 of 7

Generate combinations

  1. #1
    Registered User
    Join Date
    11-20-2011
    Location
    Northwich, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Generate combinations

    I need to work out both the number of, AND the actual combinations for the following scenario...4 questions with the same 3 answers (Y, N or P) to each question. Possible combinations are...

    Q1 Q2 Q3 Q4
    Y N Y Y
    Y P Y Y
    P P Y Y etc, etc

    But how many? and how to generat them in excel?
    Last edited by cjt_choccy; 11-20-2011 at 12:34 PM.

  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: Generate combinations

    81
    i used this
    http://www.ne.jp/asahi/math.edu/ami/myprog/jk_eng.htm
    and input yyyyppppnnnn and chose 4 permutations from the options
    yyyy
    yyyn
    yyyp
    yyny
    yynn
    yynp
    yypy
    yypn
    yypp
    ynyy
    ynyn
    ynyp
    ynny
    ynnn
    ynnp
    ynpy
    ynpn
    ynpp
    ypyy
    ypyn
    ypyp
    ypny
    ypnn
    ypnp
    yppy
    yppn
    yppp
    nyyy
    nyyn
    nyyp
    nyny
    nynn
    nynp
    nypy
    nypn
    nypp
    nnyy
    nnyn
    nnyp
    nnny
    nnnn
    nnnp
    nnpy
    nnpn
    nnpp
    npyy
    npyn
    npyp
    npny
    npnn
    npnp
    nppy
    nppn
    nppp
    pyyy
    pyyn
    pyyp
    pyny
    pynn
    pynp
    pypy
    pypn
    pypp
    pnyy
    pnyn
    pnyp
    pnny
    pnnn
    pnnp
    pnpy
    pnpn
    pnpp
    ppyy
    ppyn
    ppyp
    ppny
    ppnn
    ppnp
    pppy
    pppn
    pppp
    Last edited by martindwilson; 11-20-2011 at 09:37 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
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Re: Generate combinations

    3 to the power of 4 = 81 combinations
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    157

    Re: Generate combinations

    A combination of CHOOSE, MOD, INT and ROW functions like in attached workbook.

    Beau Nydal
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-20-2011
    Location
    Northwich, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Generate combinations

    Thanks for response. Problem now resolved and can use solution for similar porblems in the future.

  6. #6
    Registered User
    Join Date
    11-20-2011
    Location
    Northwich, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Generate combinations

    Very helpfull and much appreciated

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

    Re: Generate combinations

    There's a workbook that will do this at http://www.box.com/shared/ubd28tissi
    Entia non sunt multiplicanda sine necessitate

+ 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