Having difficulty making a dynamic skills matrix.

Zolkora

New Member
Joined
Aug 17, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Good day folks, as the title suggests I'm attempting to make a dynamic skills matrix, or rather an automated task assigner.

I've been at this for 2 days and I'm at a loose end. I don't even know if it's possible with formula in Excel. Let me explain what's going on.
So across the top we have the duties, some are numbered and some are named. Down the left obviously are the employees names.
In the middle is a score from 1 to 10 on how each employee performs on each duty. (ie. Bob is perfect for Duty 13)
Each morning, each employee needs to tackle 2 duties. the first is easy. I simply run an INDEX and MATCH on the table and run the
LARGE function for each employee. The trouble I'm having is when it comes to the second task. The 3 columns after task 2 are
me testing and failing. What I need is for it to assign the 2nd duty based on the criteria in the table, with no duplicates.
Basically the best man for the job with no repeated work. Can this be done or am I asking too much? Thanks in advance!

Steve

1660763765118.png
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
=INDEX($L$3:$AE$3,1,LARGE((--($L4:$AE4=LARGE($L4:$AE4,E$2)))*(COLUMN($L$4:$AE$4)-11),1))
1660771278496.png
 
Upvote 0
Welcome to the Forum!

Here's one relatively simple way you could approach this:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2EmployeeTask 1Score 1Employeeabcdefghijklmnopqrst
3Ai10A7843810889764
4Bm10B8755910997
5Cj10C536271010910
6De7D7747
7Eb6E65436
8Ff9F299394
9Gl10G5510106
10Hh9H894676
11In8I24426284
12Ja7J79585773375
13Task 1Average8.6
14Task 2Score 2Average6.3
15Ao9
16Bk9
17Cc3
18Dg7
19Ed5
20Fp9
21Gs6
22Ht6
23Iq4
24Jr7
25Task 2Average6.5
26
Sheet1
Cell Formulas
RangeFormula
C3:C12C3=LET(Ey,$G$2:$Z$2,GetBest(Ey,IF(ISNA(MATCH(Ey,C$2:C2,)),$G3:$Z3)))
D3:D12D3=XLOOKUP(C3,G$2:Z$2,G3:Z3)
D13,D25D13=AVERAGE(D3:D12)
G14G14=AVERAGE(G3:Z12)
C15:C24C15=LET(Ey,$G$2:$Z$2,GetBest(Ey,IF(ISNA(MATCH(Ey,C$2:C14,)),$G3:$Z3)))
D15:D24D15=XLOOKUP(C15,G$2:Z$2,G3:Z3)

GetBest: =LAMBDA(a,b,INDEX(a,MATCH(MAX(b),b,)))

This does the allocation sequentially by employee. You could flip this and process sequentially by task, which would produce different results. Neither would necessarily be the optimum solution - for that you'd need something more complicated to take into account the various possible combinations.

You may also need to vary the order in which you process the employees. In your example, Cropper can do only three jobs, so you'd better give him two of these before you start allocating jobs to other people.
 
Last edited:
Upvote 0
=INDEX($L$3:$AE$3,1,LARGE((--($L4:$AE4=LARGE($L4:$AE4,E$2)))*(COLUMN($L$4:$AE$4)-11),1))
View attachment 71868
Thanks man, although I get the same issue here that I faced. The tasks only need done once. So in this example we have Ken and Gordon both completing Duties 7 and 10, albeit at separate times. I would like for it (In for example Ken's case) to see that Duty 7 is covered, so look for the next best task for that employee that isn't covered in the first column. So in his case it would be N4.

Cheers.
 
Upvote 0
Firstly, I really appreciate you guys taking the time to help, really. I'm still facing the same obstacles. I can get it to check what tasks are performed for task 1 and avoid them, and then assign tasks for task 2. However at that stage there is some crossover. For task 2 in this instance i've got one duty assigned to 3 people on my sheet in its's current state. If I could run some formula after that, that could say something like "If there's duplicates then use whomever score was highest". I just don't know how. Agh, Sorry, and Thanks... again.

I'll try and share my document, if that helps.

 
Upvote 0
I stacked the two tasks in a single column, to simplify checking for duplicates. Your formulae for task 2 are now looking in the wrong place.

For example, here's your formula for D12 - it's checking for duplicates in the pink highlighted range C2:C23, not finding N4, and hence allocating N4 to Gary (even though it has actually been allocated twice already).

1660877515390.png


We could update my formulae to point to more then one column. But here's a simple patch instead, which just copies the Task 2 allocations to the end of column C.

Note that I have also tweaked the LAMBDA for GetBest, so it that only returns tasks with a non-blank score.

ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1NameTask 1ScoreTask 2Score
2
3Ken1010N47DUTY
4Gordon710116Employee245789101112131415N1N2N3N4PD1PD3PD4DS
5Bon1310149Ken19431056287
6Bill121087Gordon21034965178
7Stewart91047Bon68721431095
8JohnPD310N28Bill2478391065
9PaulPD410N19Stewart47891053216
10Mat510??? John32167851094
11MarkPD110159Paul79564108
12GaryN31024Mat91087
13ChristianDS10??? Mark8910
14Task 2Gary46587109
15N4Christian8910
1611
1714Overall score6.2
188Av Task 110
194Av Task 27.3
20N2
21N1
22???
2315
242
25
Sheet1
Cell Formulas
RangeFormula
C3:C13C3=LET(Ey,$M$4:$AF$4,GetBest(Ey,IF(ISNA(MATCH(Ey,C$2:C2,)),$M5:$AF5)))
D3:D13,F3:F13D3=IF(C3="???","",XLOOKUP(C3,$M$4:$AF$4,$M5:$AF5))
E3:E13E3=LET(Ey,$M$4:$AF$4,GetBest(Ey,IF(ISNA(MATCH(Ey,C$2:C14,)),$M5:$AF5)))
M17M17=AVERAGE(M5:AF15)
M18M18=AVERAGE(D3:D13)
M19M19=AVERAGE(F3:F13)
C15:C24C15=E3

GetBest: =LAMBDA(a,b,LET(m,MAX(b),IF(m=0,"???",INDEX(a,MATCH(m,b,)))))
 
Upvote 0
Welcome to the Forum!

Here's one relatively simple way you could approach this:

GetBest: =LAMBDA(a,b,INDEX(a,MATCH(MAX(b),b,)))

This does the allocation sequentially by employee. You could flip this and process sequentially by task, which would produce different results. Neither would necessarily be the optimum solution - for that you'd need something more complicated to take into account the various possible combinations.

You may also need to vary the order in which you process the employees. In your example, Cropper can do only three jobs, so you'd better give him two of these before you start allocating jobs to other people.
This is great work, thankyou. I've pretty much replicated the sheet you made, but made some modifications relative to my circumstance. I have a question though.

Using your System, Gary would be carrying out tasks N3 and another lower scoring task. He scores highest on N3 then next highest in N4, so ideally i'd like him to do that. Is this because the spreadsheet is processing the results sequentially by employee and not by task? You mentioned that was possible. Is that an easy modification? I know I'm a pest lol.
 
Upvote 0
By employee:

ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAE
1
2EmpTaskEmpTask1Task2Score1Score2Employee\Task245789101112131415N1N2N3N4PD1PD3PD4DS
3Ken10Ken108104Ken19431056287
4Gordon7Gordon7N4108Gordon21034965178
5Bon13Bon1314109Bon68721431095
6Bill12Bill12???10 Bill2478391065
7Stewart9Stewart92104Stewart47891053216
8JohnPD3JohnPD3N2108John32167851094
9PaulPD4PaulPD4N1109Paul79564108
10Mat5Mat5???10 Mat91087
11MarkPD1MarkPD115109Mark8910
12GaryN3GaryN34106Gary46587109
13ChristianDSChristianDS11108Christian8910
14Christian11
15JohnN2Av10.07.2
16GordonN4Min104
17Ken8
18Gary4
19Bill???
20Bon14
21Stewart2
22Mat???
23Mark15
24PaulN1
Sheet1
Cell Formulas
RangeFormula
E3:E13E3=K3:K13
H3:I13H3=IFERROR(XLOOKUP(F3,$L$2:$AE$2,XLOOKUP($E3,$K$3:$K$13,$L$3:$AE$13)),"")
F3:G13F3=TRANSPOSE(FILTER(C$3:C$24,B$3:B$24=E3))
H15:I15H15=AVERAGE(H3:H13)
H16:I16H16=MIN(H3:H13)
C3:C24C3=LET(Task,$L$2:$AE$2,GetBest(Task,IF(ISNA(MATCH(Task,C$2:C2,)),XLOOKUP(B3,K$3:K$13,L$3:AE$13))))
Dynamic array formulas.

GetBest: =LAMBDA(a,b,LET(m,MAX(b),IF(m=0,"???",INDEX(a,MATCH(m,b,)))))

By task:

ABCDEFGHIJKLMNOPQRSTUV
1
2TaskEmpEmpTask1Task2Score1Score2Task\EmployeeKenGordonBonBillStewartJohnPaulMatMarkGaryChristian
3PD3JohnKen1010 21264384
4PD4PaulGordon710 482796
5PD1MarkBon1413910578105
6N2JohnBill91189791048
7N1PaulStewart2849843279
815MarkJohnPD3N21089341810
914BonPaulPD4N110910109357
1013BonMat45910115649328
112StewartMarkPD115109126531019
124MatGaryN3N410913102
135MatChristian12DS91014918
147Gordon15679
158StewartAv9.09.2N179
169BillMin48N2216857
1710KenN387610
1811BillN47859
1912ChristianPD15610
20N3GaryPD3104
21N4GaryPD4910
22DSChristianDS54810
23
Sheet2
Cell Formulas
RangeFormula
E3:E13E3=TRANSPOSE(L2:V2)
H3:I13H3=IFERROR(XLOOKUP(F3,$K$3:$K$22,XLOOKUP($E3,$L$2:$V$2,$L$3:$V$22)),"")
F3:F4,F5:G13F3=TRANSPOSE(FILTER(B$3:B$22,C$3:C$22=E3))
H15:I15H15=AVERAGE(H3:H13)
H16:I16H16=MIN(H3:H13)
C3:C22C3=LET(Ey,$L$2:$V$2,GetBest(Ey,IF(COUNTIF(C$2:C2,Ey)<2,XLOOKUP(B3,K$3:K$22,L$3:V$22))))
Dynamic array formulas.

I had a quick play with the order the tasks were assigned, and came up with these two possibilities, where 4 was the worst score. There may be more optimal solutions.
 
Upvote 0

Forum statistics

Threads
1,214,846
Messages
6,121,905
Members
449,054
Latest member
luca142

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