I have a table with a list of tasks that happen on three shifts, and a list of employees that will be assigned to these tasks.
each employee can't be assigned to the same task twice in the same day and can't have two tasks in the same shift.
currently, I'm using this function =INDEX(Employees!$A$2:$A$31,RANK(Employees!B2,Employees!$B$2:$B$31)+COUNTIF(Employees!$B$2:Employees!B2,employees!B2)-1)
I use this function in each column separately and change the "-1" in each column to make sure that no employee gets the same task twice.
The problem is as you can see that sometimes it results in #ref error and sometimes the Rand() function results in the same value as in shift 2 Noah is presented twice also I couldn't check if the employee is working that day or not unless I extract the working employees for each day separately which I want to avoid.
Also, I would like to know if there's a way to make sure that each employee get assigned the same amount of tasks that day or that no employee doesn't get assigned a task.
I can't use VBA as I have to use office 365 on the web which uses typescript only in the enterprise edition.