IFNA VLOOKUP with multiple repeating table arrays with filter

needhelp_please

New Member
Joined
Jun 2, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi all, I have an interesting issue I have been searching far and wide for a solution to no avail.

I have 3 employees who are assigned tasks every week. They rotate tasks every week. There are about 30 tasks, but they change every week so one week tasks A, J L K need to be assigned and the next week tasks B, C, E, F, K need to be assigned. They're always different.

I created a table with drop down lists of the different tasks. I was able to create a formula to randomly assign the tasks to the 3 employees, but they are not balanced. Some tasks are hard, others are not, so one employee should not have all hard tasks while another has none.

To randomly assign the tasks, I created 3 different lists randomly alternating the employee names. So I have 3 different vlookups that I use in the table:

Task AEmployee 1
Task BEmployee 2
Task CEmployee 3
Task DEmployee 1
Task EEmployee 2
Task FEmployee 3
Task G etc...Employee 1 etc..

=IFNA(VLOOKUP(@F:F,Instructions!A12:B39, 2, FALSE), "")

Task AEmployee 2
Task BEmployee 3
Task CEmployee 1
Task DEmployee 2
Task EEmployee 3
Task FEmployee 1
Task G etc..Employee 2 etc..

=IFNA(VLOOKUP(@F:F,Instructions!A42:B69, 2, FALSE), "")

Task AEmployee 3
Task BEmployee 1
Task CEmployee 2
Task DEmployee 3
Task EEmployee 1
Task FEmployee 2
Task G etc...Employee 3 etc..

=IFNA(VLOOKUP(@F:F,Instructions!A72:B99, 2, FALSE), "")

I repeat these formulas by dragging them down the column in the table to assign the tasks.

In order to make it more balanced/fair, I decided to try alternating the employee names based on the difficulty of the different tasks:

Task A - easyEmployee 1
Task B - easyEmployee 1
Task C - mediumEmployee 2
Task D - mediumEmployee 2
Task E - hardEmployee 3
Task F - hard Employee 3



Task A - easyEmployee 2
Task B - easyEmployee 2
Task C - mediumEmployee 3
Task D - mediumEmployee 3
Task E - hardEmployee 1
Task F - hardEmployee 1



Task A - easyEmployee 3
Task B - easyEmployee 3
Task C - mediumEmployee 1
Task D - mediumEmployee 1
Task E - hardEmployee 2
Task F - hardEmployee 2

Which made the assignments more balanced, but I still had to reassign a few tasks.

My problem is.. when I filtered the table and attempted to drag down the 3 repeating formulas, it only repeated the first formula. Apparently we cannot drag and drop alternating formulas down a filtered table. There are empty rows in the table so if I unfilter then drag down the formulas, the empty rows mess up the fairness/balance of the assigned tasks. So is there a way to combine these 3 formulas into one formula, so that I can drag down the one formula after filtering?

Here are the 3 formulas again:

=IFNA(VLOOKUP(@F:F,Instructions!A12:B39, 2, FALSE), "")
=IFNA(VLOOKUP(@F:F,Instructions!A42:B69, 2, FALSE), "")
=IFNA(VLOOKUP(@F:F,Instructions!A72:B99, 2, FALSE), "")

Essentially I would like a formula that assigns the first easy task to Employee 1, but the next time that task appears in the table it is assigned to Employee 2, etc. And does the same for the medium and hard tasks.

Let me know if I need to upload sheets to make this easier to understand.

There may be an easier way to assign tasks fairly altogether, I hope some geniuses out there can help me out!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
A few edits:

Some tasks are hard, others are not, so one employee should not have all hard tasks while another has no hard tasks and all easy ones.

Essentially I would like a formula that assigns the first easy task to Employee 1, but the next time an easy task appears in the table it is assigned to Employee 2, then the next time Employee 3.. then back to Employee 1, etc. And does the same for the medium and hard tasks.

Also just to clarify, I'm unable to delete the empty rows.
 
Upvote 0
Nvm I figured out how to combine the formulas into one using chatgpt

=IFNA(IF(MOD(ROW(),3)=1, VLOOKUP(@F:F,Instructions!$A$12:B$39, 2, FALSE), IF(MOD(ROW(),3)=2,VLOOKUP(@F:F,Instructions!$A$42:B$69, 2, FALSE),VLOOKUP(@F:F,Instructions!$A$72:B$99, 2, FALSE))),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,832
Messages
6,127,152
Members
449,366
Latest member
reidel

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