+ Reply to Thread
Results 1 to 4 of 4

List of 15 elements, need to generate all 6 element combinations.

  1. #1
    Registered User
    Join Date
    09-22-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2007
    Posts
    1

    List of 15 elements, need to generate all 6 element combinations.

    Hey so like the title says, I have a list of 15 elements in column a and I'd like to list all possible 6 element combinations in a18 and beyond (each element being on its own column on the same row. I'm assuming I'll have to use a macro but I don't know how to do that...?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: List of 15 elements, need to generate all 6 element combinations.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    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: List of 15 elements, need to generate all 6 element combinations.

    There's a workbook that will do this at https://app.box.com/s/b9b9fc06beb63b9562f9

    A
    B
    2
    n
    3
    18
    4
    mMin
    5
    6
    6
    mMax
    7
    6
    8
    nComb
    9
    18,564
    10
    11
    m
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 17 18
    12
    6
    6 5 4 3 2 1
    13
    6
    7 5 4 3 2 1
    14
    6
    7 6 4 3 2 1
    15
    6
    7 6 5 3 2 1
    16
    6
    7 6 5 4 2 1
    17
    6
    7 6 5 4 3 1
    18
    6
    7 6 5 4 3 2
    19
    6
    8 5 4 3 2 1
    20
    6
    8 6 4 3 2 1
    21
    6
    8 6 5 3 2 1
    22
    6
    8 6 5 4 2 1
    23
    6
    8 6 5 4 3 1
    24
    6
    8 6 5 4 3 2
    25
    6
    8 7 4 3 2 1
    26
    6
    8 7 5 3 2 1
    27
    6
    8 7 5 4 2 1
    28
    6
    8 7 5 4 3 1
    Entia non sunt multiplicanda sine necessitate

  4. #4
    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: List of 15 elements, need to generate all 6 element combinations.

    Sorry, the example should be ...

    A
    B
    2
    n
    3
    15
    4
    mMin
    5
    6
    6
    mMax
    7
    6
    8
    nComb
    9
    5,005
    10
    11
    m
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
    12
    6
    6 5 4 3 2 1
    13
    6
    7 5 4 3 2 1
    14
    6
    7 6 4 3 2 1
    15
    6
    7 6 5 3 2 1
    16
    6
    7 6 5 4 2 1
    17
    6
    7 6 5 4 3 1
    18
    6
    7 6 5 4 3 2
    19
    6
    8 5 4 3 2 1
    20
    6
    8 6 4 3 2 1
    21
    6
    8 6 5 3 2 1
    22
    6
    8 6 5 4 2 1
    23
    6
    8 6 5 4 3 1
    24
    6
    8 6 5 4 3 2
    25
    6
    8 7 4 3 2 1
    26
    6
    8 7 5 3 2 1

+ 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. [SOLVED] Run-time error 6: Overflow - Trying to generate list of combinations
    By AdamParker in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-22-2013, 10:54 AM
  2. Generate list of possible combinations
    By Pat Parker in forum Excel General
    Replies: 2
    Last Post: 03-14-2010, 03:34 PM
  3. Pivot table-update the element in the array and stop other elements changing
    By zaalhy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2008, 10:42 AM
  4. Is it possible to make exact combinations of different elements dynamically.
    By all4excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-10-2008, 05:20 AM
  5. Need to derive combinations for 4 elements each with 3 possible va
    By LAdekoya in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-08-2005, 08:30 AM

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