+ Reply to Thread
Results 1 to 5 of 5

Combinations of options on the table

  1. #1
    Registered User
    Join Date
    06-30-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    I'm not sure
    Posts
    2

    Combinations of options on the table

    Hello All

    I am a first time user and I really hope someone can help me.

    My issue is have to create a table which lists all the combinations from the different criteria.

    There are six criteria, 4 criteria only have two options (0 or 1), but there are two criteria that have 3 options (0, 1, 2).

    I think the total number of possibilities is 144.

    Does someone have an easier way to come up with the 144 options or can help me complete this table?

    See attached.

    If someone can please help, that would be much appreciated.

    Many thanks,
    ES
    Attached Files Attached Files
    Last edited by es1; 06-30-2016 at 08:05 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,811

    Re: Combinations of options on the table

    I'm not sure what your lower table is meant to represent. Do you want a list of all those variations, i.e. 000000, 000001, 000002, 000010, 000011, 000012 ... and so on, where each digit represents one criterion?

    Pete

  3. #3
    Registered User
    Join Date
    06-30-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    I'm not sure
    Posts
    2

    Re: Combinations of options on the table

    Hi Pete, I am not sure if you got my last message.

    I was saying that you are on the right path, I have attached what I have done so far, it's all on trail and error.

    Thank you again for replying :-)

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,811

    Re: Combinations of options on the table

    I've changed the top part of Sheet1 to make it a bit more flexible, allowing you to list up to 5 options for each criteria. Then, working from criteria 6 (as the least significant digit of the final result), I put this formula in J11:

    =INDEX(J$3:J$7,MOD(ROWS($1:1)-1,J$2)+1)

    When this formula is copied down it produces the list of options and then repeats them, i.e. 0, 1, 2, 0, 1, 2, 0, 1 ... and so on.

    The formula in I11 is slightly different, i.e.:

    =INDEX(I$3:I$7,MOD(INT((ROWS($1:1)-1)/PRODUCT(J$2:$J$2)),I$2)+1)

    When this is copied down it repeats the first element for criteria 5 for as many options as there are in criteria 6 (i.e. 3 zeros) and then repeats the second element the same number of times, and does this for as many elements as there are in criteria 5, and then repeats the whole sequence again, so you get 0 0 0 1 1 1 0 0 0 1 ... and so on.

    The formula from I11 can be copied into H11, and it becomes:

    =INDEX(H$3:H$7,MOD(INT((ROWS($1:1)-1)/PRODUCT(I$2:$J$2)),H$2)+1)

    The main change is with the range in the PRODUCT term (there are also changes from column I to column H), so this now takes account of the fact that there are 2 options in column I and 3 options in column J, so the sequence of criteria 4 options will be repeated six times, i.e. 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 ... etc. as the formula is copied down.

    The same formula in H11 can be copied into G11, F11 and E11, and when copied down the appropriate sequences for those criteria are set up. As there are 144 unique combinations, the formulae in row 11 need to be copied down to row 154 - any further, and the pattern will repeat from the beginning.

    Now, you can put whatever you want as the options for each criteria (e.g. "Y" or "N", "TRUE" or "FALSE", or letters), and you can have up to 5 options for each criteria, and the formulae will automatically adjust - you may need to copy the formulae down further if you use more options.

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Combinations of options on the table

    I like Pete's solution. Here is a "brute force" method progressing from left to right and then entering the values obtained into the table.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. Counting combinations in a table.
    By lotero in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-11-2020, 05:26 AM
  2. [SOLVED] Generate Different Combinations of Yes or No To n Amount of Options
    By QAChaska in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2014, 05:30 PM
  3. Table of Possible Combinations
    By BDR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2011, 06:40 PM
  4. Replies: 1
    Last Post: 08-25-2010, 09:45 AM
  5. [SOLVED] Generate table of combinations
    By Gary's Student in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-02-2005, 07:05 PM
  6. Pivot table to launch Macro- preserve format under table options
    By Darin Kramer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2005, 02:05 PM
  7. [SOLVED] Pivot Table - Default Settings for Table Options
    By Nacho in forum Excel General
    Replies: 0
    Last Post: 02-25-2005, 02:06 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