Assign Round Robin Based on Criteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following table:

Book1
BCD
3DateCase NumberPatient Name
428/9/2022LA1457Javier Rami
528/9/2022LA1458Javier Rami
629/9/2022LA1459Ila Riley
730/9/2022LA1460Hailey Amber
830/9/2022LA1461Hailey Amber
92/10/2022LA1462Meera Thor
1029/9/2022LA1463Rambert Hool
1130/9/2022LA1464Oolea Romeo
1229/9/2022LA1465Ashely Huth
1330/9/2022LA1466Boneer Vice
Sheet1

Book1
G
3Case Worker Pool
4Alan
5Michael
6Johnny
7Reena
8Joey
Sheet1


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 number 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 E. Is there a formula that could be used in column E to achieve this ? Appreciate all the help.

Book1
BCDEFG
3DateCase NumberPatient NameCase WorkerCase Worker Pool
428/9/2022LA1457Javier RamiAlanAlan
528/9/2022LA1458Javier RamiAlanMichael
629/9/2022LA1459Ila RileyMichaelJohnny
730/9/2022LA1460Hailey AmberJohnnyReena
830/9/2022LA1461Hailey AmberReenaJoey
92/10/2022LA1462Meera ThorJoey
1029/9/2022LA1463Rambert HoolMichael
1130/9/2022LA1464Oolea RomeoJohnny
1229/9/2022LA1465Ashely HuthReena
1330/9/2022LA1466Boneer ViceJoey
Sheet1
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi,

Sorry- The sentence below should read as "....same patient name" instead of "..same patient number..."

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 number within the same date, then these case should be assigned to the same case worker.
 
Upvote 0
Hi,

I have cross poste here:

 
Upvote 0
The formula for D2:
Excel Formula:
=INDEX(E:E,MOD(MATCH(1,(A2=FILTER(SORT(UNIQUE(FILTER(A:C,{1,0,1}))),{1,0}))*(C2=FILTER(SORT(UNIQUE(FILTER(A:C,{1,0,1}))),{0,1})),0)-1,COUNTA(E:E)-1)+2)

Full explanation and workbook in the crossposted thread on excelforum.com (mentioned above).
 
Upvote 0
Solution

Forum statistics

Threads
1,215,454
Messages
6,124,932
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top