+ Reply to Thread
Results 1 to 6 of 6

RANDOM function to generate teams with an exception

  1. #1
    Registered User
    Join Date
    11-11-2019
    Location
    Michigan, USA
    MS-Off Ver
    Pro
    Posts
    4

    RANDOM function to generate teams with an exception

    Hello,

    I have been driving myself mad trying to figure this out. I have 8 people from 8 departments that need to (randomly) team up:
    Two 3 person teams and one team being only two people to perform an audit. Both 3 person teams need to audit 3 departments together and the 2 person team audits 2 departments BUT cannot end up in their own department. I may be able to get away with four 2 person teams to make it a little easier. I need to randomize teams without auditing their own departments every month, how can i get this to work in excel? I have attached an example, on the left is what i'm starting with and on the right is an example of what i need to randomly generate monthly. Please help!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: RANDOM function to generate teams with an exception

    =--AND(COUNTIF(H$3:H3,1)<=LOOKUP($F4,$S$1:$T$3),SUM($G4:G4)<=LOOKUP($F4,$S$1:$T$3),ISNA(MATCH(H$2,IF($F$4:$F$11=$F4,$E$4:$E$11),))) array formula
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-11-2019
    Location
    Michigan, USA
    MS-Off Ver
    Pro
    Posts
    4

    Re: RANDOM function to generate teams with an exception

    Okay, i see.. How can i automatically assign those teams to audit departments together without auditing their own department?

  4. #4
    Registered User
    Join Date
    11-11-2019
    Location
    Michigan, USA
    MS-Off Ver
    Pro
    Posts
    4

    Re: RANDOM function to generate teams with an exception

    If i wanted to switch it to 2 person teams, how would i do so?
    Last edited by iiMike; 11-18-2019 at 08:56 AM.

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: RANDOM function to generate teams with an exception

    Try this:

    =INDEX($C$4:$C$11,AGGREGATE(15,6,ROW($A$4:$A$11)/($A$4:$A$11<>E4)/(COUNTIF($G$3:G3,$C$4:$C$11)=0)
    -ROW($A$3),RANDBETWEEN(1,SUMPRODUCT(($A$4:$A$11<>E4)*(COUNTIF($G$3:G3,$C$4:$C$11)=0)))))

    If G11 results #NUM !, please press F9 to get new results.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-11-2019
    Location
    Michigan, USA
    MS-Off Ver
    Pro
    Posts
    4

    Re: RANDOM function to generate teams with an exception

    Perfect! You guys have been awesome thank you for the help!!! Now how do i mark this as solved?

+ 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] Random Teams Formula Way
    By xjohnson in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-18-2018, 02:20 PM
  2. Using Random function and Vlookup to generate a time
    By FerociousCamel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-06-2018, 08:15 PM
  3. Function to Generate Random Numbers and Letters
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-14-2010, 03:39 PM
  4. Generate Random Teams
    By rwhite713 in forum Excel General
    Replies: 3
    Last Post: 07-24-2010, 08:07 PM
  5. Auto-generate an exception report
    By hrhr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2009, 02:05 AM
  6. generate a random number and use if function to generate new data
    By Dogdoc1142 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2006, 10:50 PM
  7. [SOLVED] VBA module/function to generate random numbers with specified mean and SD
    By Robert Reid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-26-2005, 09:05 PM

Tags for this Thread

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