+ Reply to Thread
Results 1 to 3 of 3

Random names without duplicates and multiple criteria

  1. #1
    Registered User
    Join Date
    07-18-2016
    Location
    Phoenix, AZ
    MS-Off Ver
    2013
    Posts
    2

    Random names without duplicates and multiple criteria

    Hello everyone,

    I'm trying to create a list of random names based on different job functions that people are trained on. So far I can do each job function separately using

    =INDEX($B$15:$B$44,LARGE(IF($D$15:$D$44=$G$14,ROW($D$15:$D$44)-ROW($D$15)+1),INT(RAND()*COUNTIF($D$15:$D$44,$G$14)+1)))

    but I'm having trouble when it comes to combining all of the lists. Some people are trained in multiple functions and others only in one but I don't want those that are trained in multiple functions to show up on multiple lists. Is there a way to have excel excluded a persons same in a new random list if they are already showing up in another? I'm not sure if I'm explaining this correctly but any advise would be much appreciated.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Random names without duplicates and multiple criteria

    Hi,
    Not seeing your data and layout I could just suggest moving RAND() to separate cell, in a formula refer to this cell and include additional COUNTIF for already generated job function(s).
    On the other hand, seems that solution with VBA (either stand alone macro or UDF) could be better and more flexible solution.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    07-18-2016
    Location
    Phoenix, AZ
    MS-Off Ver
    2013
    Posts
    2

    Re: Random names without duplicates and multiple criteria

    Thanks for the input Kaper. I have attached what I hope will help understand what it is I'm trying to accomplish. I've just manually inputted the outputs that I'm seeing. I've somewhat solved the repeating issue within the same job function, now it's just a matter of making sure that the same employee isn't assigned to multiple job functions. I'm also curious if there is a way to limit the number of outputs, for instance if job W needs 5 people today but only 3 tomorrow.


    Job Functions What I'm getting now
    W X Y Z random selection for Job W random selection for job X random selection for job Y Random selection for job Z
    Employee A B A D
    A yes yes B
    B yes yes yes yes
    C yes yes
    D yes yes
    E yes yes random selection for Job W random selection for job X random selection for job Y Random selection for job Z
    A C D E
    B
    Attached Files Attached Files
    Last edited by finch2o; 07-19-2016 at 11:47 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. Select a cell at random based on multiple selection criteria across multiple sheets.
    By scottyms in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2016, 09:44 AM
  2. Random Numbers assigned to static values multiple times no duplicates....?
    By rhattala in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-24-2014, 09:40 PM
  3. [SOLVED] Countifs with multiple criteria and one criteria has a list of names
    By Beefy1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2014, 05:25 PM
  4. Replies: 10
    Last Post: 11-06-2013, 11:55 PM
  5. [SOLVED] Random selecting 20 items base on criteria with no duplicates
    By emina002 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-19-2013, 04:50 AM
  6. [SOLVED] Random names without any duplicates
    By wessie in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-15-2012, 04:47 PM
  7. [SOLVED] Random selection of names with no duplicates and ignoring a predetermined name list
    By iain.excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-16-2012, 06:51 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