+ Reply to Thread
Results 1 to 10 of 10

help autopopulate combinations in a table

  1. #1
    Registered User
    Join Date
    05-10-2019
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    4

    help autopopulate combinations in a table

    I have a table which I need to use to determine all possible testcases.

    Therefore, I need to determine and specify all unique combinations.

    In terms of 1 (set), and 0 (not set),

    Does Excel provide a formula to populate all possible rows with unique combinations for all classes?

    see attached a file with an example. In the example I have manually populated 2 rows, but there are more (I think in total 64, but not sure).

    I was thinking Excel might be able to help me with this, so that all (64 ?) unique rows are populated.

    2019-05-10_18-19-21.png
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: help autopopulate combinations in a table

    Think Binary
    00000000
    00000001
    00000010
    00000011
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: help autopopulate combinations in a table

    Attached is one way of doing this with the DEC2BIN and MID functions
    Attached Files Attached Files
    Martin

  4. #4
    Registered User
    Join Date
    05-10-2019
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    4

    Re: help autopopulate combinations in a table

    Thanks for the quick reaction. I have looked in the attached file. How did you come to the 64 rows? did you "made" these yourself or let Excel calculate these?

    Need to understand it more. It seems like you use a function to transfer decimal to binary and then split these, but how did you come to 64 combinations in the first place?
    Last edited by AliGW; 05-12-2019 at 11:02 AM.

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: help autopopulate combinations in a table

    It's 2 to the power of 6 as we have 2 choices for 6 columns.

    The formulae were written in cells B2 and C2 and dragged down and across as required. Note the use of the $ in the addresses to force column B and row 1 to remain constant.

  6. #6
    Registered User
    Join Date
    05-10-2019
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    4

    Re: help autopopulate combinations in a table

    Thanks for explanation. I am looking for a formula which also works for having > 2 choices per class.

    See attached example
    Attached Files Attached Files
    Last edited by AliGW; 05-12-2019 at 11:02 AM.

  7. #7
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: help autopopulate combinations in a table

    Maybe you need something like this which I created years ago.

    http://www.excelforum.com/showthread.php?p=1775256

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,693

    Re: help autopopulate combinations in a table

    Mgroen - please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  9. #9
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: help autopopulate combinations in a table

    Quote Originally Posted by mgroen View Post
    I am looking for a formula which also works for having > 2 choices per class.
    Are some of the choices mutually exclusive? In other words for class-1 can you have both "yes" and "no" or is it either "yes" or "no"? If the latter then the number of combinations is substantially reduced. If the former, then in the case of example-2 you now have 8 columns instead of 6 columns so isn't it just an extension of what Martin did in post #3 extended to 8 columns instead of 6 for a total number of 2^8 = 256 combinations or rows?

  10. #10
    Registered User
    Join Date
    05-10-2019
    Location
    Netherlands
    MS-Off Ver
    2016
    Posts
    4

    Re: help autopopulate combinations in a table

    All,

    I have found a tool which calculates all possible values, and its output can be loaded in Excel.

    Exactly what I needed, the tool is called Pict , more info on it (google on pict pair wise testing tool
    Thanks for all the help!

+ 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. Matrix Table to autopopulate
    By Overdahill in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-06-2018, 07:20 AM
  2. Autopopulate dates from table to monthly calendar
    By emjean11 in forum Excel General
    Replies: 4
    Last Post: 10-25-2017, 10:08 AM
  3. need photo to autopopulate when a number changes in a table
    By Tburge in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-28-2017, 06:57 AM
  4. [SOLVED] Autopopulate macro, needs to searrch for appropriate section to autopopulate
    By Butcher1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2015, 09:11 AM
  5. Pull information from a table to autopopulate another sheet
    By timnabholz in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 08-06-2014, 09:11 PM
  6. Replies: 5
    Last Post: 11-18-2013, 09:47 AM
  7. Autopopulate table
    By BRISBANEBOB in forum Excel General
    Replies: 4
    Last Post: 12-03-2010, 09:31 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