+ Reply to Thread
Results 1 to 7 of 7

VBA to have permutations and combinations to make groups

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    VBA to have permutations and combinations to make groups

    We have a group of 100 people and may regularly receive such no of people,our job is to make N number of groups and rotate them make them such combination day wise so that each person mingle with other and know each other

    For example 100 people can be made 10 groups and each person will move to another group each day in sitting arrangement.
    So what if we have 50 people and we have 3 days training program, similarly will be such task of mingling in front of us, we will get data of all participants in excel

  2. #2
    Registered User
    Join Date
    12-30-2021
    Location
    Toronto
    MS-Off Ver
    365
    Posts
    51

    Re: VBA to have permutations and combinations to make groups

    Hard to understand your intention. Please be more specific on your output requirement with an concrete example.

  3. #3
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: VBA to have permutations and combinations to make groups

    for the moment, just with numbers, with the real names is just a small modification.
    Attached Files Attached Files
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    12-30-2021
    Location
    Toronto
    MS-Off Ver
    365
    Posts
    51

    Re: VBA to have permutations and combinations to make groups

    still vague. There are too many combinations. What is your criterion?

  5. #5
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726
    Quote Originally Posted by Torontohrb View Post
    Hard to understand your intention. Please be more specific on your output requirement with an concrete example.
    Sir, its like when you get a batch to train them who do not know each other, to increase bonding among them and to know each other how many groups and how you will arrange sitting arrangement each day so that after lets say 5 days they know each other, it can be 5 days program 7 days program and no of people in batch will vary . Sometime you will get 50 people to train sometime 100 like that.

  6. #6
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: VBA to have permutations and combinations to make groups

    sir,thanks for your kind response ,its good and as expected but it does not give flexibility of changing no of people in a group
    for example suppose no of people are less so if i want to make group of 3 people rather than 5

    in this case i can make group of 5 only,kindly help for that too

  7. #7
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: VBA to have permutations and combinations to make groups

    At the left handside you have a list of persons, in this case name "Person 001" to "Person 099" = 99 persons.
    In E1 and E2 = 10 groups and 3 days, that's all you need = 9 groups of 10 and 1 group of 9 and that 3 times.
    So, you only have to modify the groupsize and those 2 parameters.
    In E3, you choose "Numbers" or "Names", if you want to see the numbers or the real names.

    In the last column, you see the numbers/names who already have been combined with somebody else of that group in a previous day.
    The macro works with brute force, it tries to make that schedule 500 times and takes the best solution.
    If that result is okay, then there is no need for a more sophisticated approach without a 100% guarantee of the "ultimate" solution.

    How do you solve that problem now and what are the results ?
    Attached Files Attached Files
    Last edited by bsalv; 05-25-2023 at 03:29 AM.

+ 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. Permutations and Combinations
    By spartansFC1972 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-26-2014, 11:12 AM
  2. Permutations and combinations
    By WELLO in forum Excel General
    Replies: 0
    Last Post: 11-28-2012, 11:59 AM
  3. Combinations and Permutations
    By curious1201 in forum Excel General
    Replies: 0
    Last Post: 04-19-2012, 05:21 PM
  4. combinations/permutations
    By KBownds in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-23-2012, 11:18 AM
  5. Combinations/Permutations???
    By seneca in forum Excel General
    Replies: 2
    Last Post: 02-16-2010, 01:49 PM
  6. Excel 2007 : Combinations/permutations
    By kdol in forum Excel General
    Replies: 2
    Last Post: 01-03-2009, 02:18 AM
  7. Permutations - Combinations
    By samneric in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-06-2007, 08:30 AM
  8. permutations/combinations
    By Niels in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-17-2006, 01:25 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