+ Reply to Thread
Results 1 to 8 of 8

Combination Generator

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Combination Generator

    Good afternoon,

    Could someone please point me in the right direction for a combination generator.

    I have 4 items in each subset, populated numerically 1-3

    The problem I am facing with other combination generators is that they do not duplicate values, and therefore do not work at all because there are three possibilities and 4 spaces to fill.

    So I am looking for every conceivable result.

    Myrna Larson produced a combination/Permutation Generator, but I do not understand enough to edit it to allow duplicates.

    Could someone please help me.

    I have included the code for Myrna Larson's generator below.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Combination Generator


    Hi,

    must be precise !

    Need uniques combinations or permutations ? 'cause not the same …

  3. #3
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Combination Generator

    Hi Marc,

    a non unique combination with 4 values in each subset with the values ranging from 1-3

    Eg.

    1,2,3,3
    1,1,1,1
    2,2,2,2
    3,3,3,3
    1,1,2,2
    2,2,1,1
    2,1,1,2
    1,3,3,1
    3,1,2,1
    2,1,3,1

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Combination Generator


    It's permutations then …

    I don't understand your issue with the code but you'll find many examples on web …

  5. #5
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Combination Generator

    Hi Marc,

    How do you figure that?

    Permutations only allow you to rearrange a string of values into a different order. Which is the complete opposite of what I am looking to do.

  6. #6
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Combination Generator

    In order to get around the combination not handling duplicates, I used variables 1-12 where:

    1=4=7=10
    2=5=8=11
    3=6=9=12

    And then replacing the figures as above back to the 1-3 and then using a countif to remove any duplicates.

  7. #7
    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 Generator

    There's a workbook with both formula- and VBA-based methods to do this at https://app.box.com/s/47b28f19d794b25511be
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Combination Generator


    My bad, it's combinations with duplicate items …

+ 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. Multiple combination generator
    By oliverpaton in forum Excel General
    Replies: 9
    Last Post: 03-07-2015, 06:01 AM
  2. 'In order' combination Generator
    By daisytiara in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2013, 12:03 PM
  3. [SOLVED] Combination generator - run-time error
    By markos97 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2012, 02:21 AM
  4. Combination generator needed...
    By ej2012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2011, 09:07 PM
  5. combination generator needed
    By smiso24 in forum Excel General
    Replies: 16
    Last Post: 04-12-2010, 07:18 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