+ Reply to Thread
Results 1 to 4 of 4

Assigning Round Robin Based on Criteria

  1. #1
    Forum Contributor
    Join Date
    08-19-2006
    MS-Off Ver
    Excel 365
    Posts
    229

    Assigning Round Robin Based on Criteria

    Hi,

    I have the attached table:

    The first table is the raw data. The second table shows the available pool of case workers.

    I am trying to assign the available case workers to the list of patients in table 1. The assigning should in sequence so that all case workers get equal number of patients. However, if there is a case with the same patient name within the same date, then these case should be assigned to the same case worker.

    An example of the correct results is in the table below in column C. Is there a formula that could be used in column C to achieve this ? Appreciate all the help.

    I have across post here:

    https://www.mrexcel.com/board/thread.../#post-5954921
    Attached Files Attached Files

  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,616

    Re: Assigning Round Robin Based on Criteria

    At first glance it looked easy, especially with helper column, see Shit1.
    in D2 1, and two formulas (yellow cells) copied down as needed (countifs, sum, index, mod and counta in not complicated mix).
    But then I noticed, the input table is arranged not by date, but by the case number, and it means non-uniform load for workers.

    With excel 365 specific functions (unique, filter, sort) it can be done even as single column solutoion, but it's not short formula. Could be shorter if date and patient were in adjactent columns, without case numn=ber in between.
    Anyway - for D2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I think that time to time the sheet shall be cleaned from outdated cases, to keep it working with reasonable speed. The old data can be kept in the archive,
    For such cleaning, I'd temporarily sort the table on date and caseID ascending (see copy od sheet) and copy special as values and as formats only to archive top rows but ending with a row where assigned worker is the last worker from the workers list. Then remove these rows from main table and finally (see second copy of that seet sort back on case ID

    Final comments: I expect using LET could make the formula a bit more readible, also a VBA solution could be a good idea, especially if based on worksheet_change event for columns A:C and E.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Assigning Round Robin Based on Criteria

    With "Patient Name" in column C. "Case Worker" in column D and "Case Worker Pool" in column F,
    D2=IF(C1=$C$1,$F$2,IF(D1=LOOKUP(2,1/($F$2:$F$6<>""),$F$2:$F$6),$F$2,IF(C2=C1,D1,INDEX($F$2:$F$6,MATCH(D1,$F$2:$F$6,0)+1))))

  4. #4
    Forum Contributor
    Join Date
    08-19-2006
    MS-Off Ver
    Excel 365
    Posts
    229

    Re: Assigning Round Robin Based on Criteria

    Thank you Kaper and josephteh. Appreciate your patience and solution. Have a great day ahead.

+ 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. round robin generator
    By suemailhot in forum Excel General
    Replies: 1
    Last Post: 09-11-2022, 04:41 PM
  2. Round Robin With Button
    By rp1783 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2022, 06:55 AM
  3. [SOLVED] VBA Round Robin Button
    By Cad_Bane in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2018, 12:32 PM
  4. Round robin tournament
    By les barrett in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-21-2018, 04:11 PM
  5. Round Robin combination formula?
    By xix_xix in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-24-2014, 05:02 PM
  6. Round Robin sheet
    By Windy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2013, 07:28 AM

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