Ranking people from a table I have

Ramballah

Active Member
Joined
Sep 25, 2018
Messages
344
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I have a table where I have people with 'scores' next to them. I want to basically make some kind of new table where those people are ranked for the week.
Basically I want the new table to have all the people that participated listed in there automatically and then count how many times their score is 12 or higher. With that I can get percentages of how often they score etc.
Basically:
Person A participated 6 times, and out of those 6 times only 3 times his score was above 12 so he scores a 50%. makes sense right??? I know this doesnt but bear with me.

1743257859951.png

Ma, Di, Wo, Do, Vrij, Za, Zo are just the days and then u can see basically the names and their scores infront of them. Red being below 12.
So I want a week summary with all the people (I dont have a list of all the names as the names switch every week).
Basically Ivan would come to this: participated 9 times, 3 times he scored below 12. so he gets a 66,67% basically.
Tobey participated 2 times, got both of them above 12 so he gets a 100%.

I hope this now all makes sense and hopefully someone can help me with this!
Aantal tijdenMaWieDiWieWoWieDoWieVrijWieZaWieZoWie
8-90Ivan20Tobey9Ivan22Ivan13
9-100Ivan26Tobey17Ivan20Ivan21
10-1125Patricia37Miranda19Dana25Miranda15
11-124Mara4Miranda30Ivan0Patricia22
12-1313Madelief43Ivan14Sterre6Patricia25
13-1423Patricia34Mara23Alisa12Mara24
14-1523Ashley15Patricia16Madelief14Miranda26
15-162Madelief20Miranda6Sterre8Jill31
16-1717Ashley17Ivan6Dilan4Jill0?
17-1834Zara29Emre31Alisa3Zara0?
18-192Yinthe29Dilan57Anne12Mara0?
19-209Zara8Dana6Judith7Anne0?
20-210Sterre1Emre0Anne6Anne0?
Totaal15228323413917700


TotalSucceedFail%
Ivan96366,67%
Tobey220100%
 
For the new layout
Fluff.xlsm
ABCDEFGHIJKLMNOPQR
1TijdenNaamMaNaamDiNaamWoNaamDoNaamVrijNaamZaNaamZo
208:00-09:00Ivan0Tobey20Ivan9Ivan2213
309:00-10:00Ivan0Tobey26Ivan17Ivan2021
410:00-11:00Patricia25Miranda37Dana19Miranda2515
511:00-12:00Mara4Miranda4Ivan30Patricia022
612:00-13:00Madelief13Ivan43Sterre14Patricia625
713:00-14:00Patricia23Mara34Alisa23Mara1224
814:00-15:00Ashley23Patricia15Madelief16Miranda1426
915:00-16:00Madelief2Miranda20Sterre6Jill831
1016:00-17:00Ashley17Ivan17Dilan6Jill4
1117:00-18:00Zara34Emre29Alisa31Zara3
1218:00-19:00Yinthe2Dilan29Anne57Mara12
1319:00-20:00Zara9Dana8Judith6Anne7
1420:00-21:00Sterre0Emre1Anne0Anne6
15Totaal15228323413917700
16
17
18
19
20Alisa220100.00%
21Anne41325.00%
22Ashley220100.00%
23Dana21150.00%
24Dilan21150.00%
25Emre21150.00%
26Ivan96366.67%
27Jill2020.00%
28Judith1010.00%
29Madelief32166.67%
30Mara41125.00%
31Miranda54180.00%
32Patricia53260.00%
33Sterre31233.33%
34Tobey220100.00%
35Yinthe1010.00%
36Zara31233.33%
37
Data
Cell Formulas
RangeFormula
A20:E36A20=LET(d,WRAPROWS(TOCOL(E2:R14),2),f,FILTER(d,(TAKE(d,,1)<>"")*(TAKE(d,,1)<>"?")),g,DROP(GROUPBY(TAKE(f,,1),TAKE(f,,-1),HSTACK(COUNT,LAMBDA(v,SUM(--(v>12))),LAMBDA(v,SUM(--(v<12)))),,0),1),HSTACK(g,BYROW(g,LAMBDA(br,INDEX(br,,3)/INDEX(br,,2)))))
Dynamic array formulas.
works! thank you so much! Can I sort this on the highest percentages are on top?
 
Upvote 0
How about
Excel Formula:
=LET(d,WRAPROWS(TOCOL(E2:R14),2),f,FILTER(d,(TAKE(d,,1)<>"")*(TAKE(d,,1)<>"?")),g,DROP(GROUPBY(TAKE(f,,1),TAKE(f,,-1),HSTACK(COUNT,LAMBDA(v,SUM(--(v>12))),LAMBDA(v,SUM(--(v<12)))),,0),1),SORT(HSTACK(g,BYROW(g,LAMBDA(br,INDEX(br,,3)/INDEX(br,,2)))),5,-1))
 
Upvote 0
Solution
How about
Excel Formula:
=LET(d,WRAPROWS(TOCOL(E2:R14),2),f,FILTER(d,(TAKE(d,,1)<>"")*(TAKE(d,,1)<>"?")),g,DROP(GROUPBY(TAKE(f,,1),TAKE(f,,-1),HSTACK(COUNT,LAMBDA(v,SUM(--(v>12))),LAMBDA(v,SUM(--(v<12)))),,0),1),SORT(HSTACK(g,BYROW(g,LAMBDA(br,INDEX(br,,3)/INDEX(br,,2)))),5,-1))
hero, thank you so much!
 
Upvote 0
Glad we could help & thanks for the feedback.
unsure if I need to open a new ticket, but I finished the workbook and it looks amazing. And then my when my 'boss' opened it the formula didnt work. after some looking around I noticed he uses excel 2008... He insists that he doesn't need to update it to 365.. Is there a way this formula can be changed to 2008 functions?
 
Upvote 0
There is no 2008.
Well when he opens the workbook the formula changes to this:
Excel Formula:
=_xlfn.LET(_xlpm.d;_xlfn.WRAPROWS(_xlfn.TOCOL(C14:P26);2);_xlpm.f;FILTER(_xlpm.d;(_xlfn.TAKE(_xlpm.d;;1)<>"")*(_xlfn.TAKE(_xlpm.d;;1)<>"?"));_xlpm.g;_xlfn.DROP(_xlfn.GROUPBY(_xlfn.TAKE(_xlpm.f;;1);_xlfn.TAKE(_xlpm.f;;-1);_xlfn.HSTACK(_xleta.COUNT;_xlfn.LAMBDA(_xlpm.v;SUM(--(_xlpm.v>12)));_xlfn.LAMBDA(_xlpm.v;SUM(--(_xlpm.v<12))));;0);1);SORT(_xlfn.HSTACK(_xlpm.g;_xlfn.BYROW(_xlpm.g;_xlfn.LAMBDA(_xlpm.br;INDEX(_xlpm.br;;3)/INDEX(_xlpm.br;;2))));5;-1))
So its some version that doesnt have functions like let
 
Upvote 0
Here's how to do it with functions available in Excel 2016:

Book1
ABCDEFGHIJKLMNOPQR
1TijdenNaamMaNaamDiNaamWoNaamDoNaamVrijNaamZaNaamZo
208:00-09:00Ivan0Tobey20Ivan9Ivan2213
309:00-10:00Ivan0Tobey26Ivan17Ivan2021
410:00-11:00Patricia25Miranda37Dana19Miranda2515
511:00-12:00Mara4Miranda4Ivan30Patricia022
612:00-13:00Madelief13Ivan43Sterre14Patricia625
713:00-14:00Patricia23Mara34Alisa23Mara1224
814:00-15:00Ashley23Patricia15Madelief16Miranda1426
915:00-16:00Madelief2Miranda20Sterre6Jill831
1016:00-17:00Ashley17Ivan17Dilan6Jill4
1117:00-18:00Zara34Emre29Alisa31Zara3
1218:00-19:00Yinthe2Dilan29Anne57Mara12
1319:00-20:00Zara9Dana8Judith6Anne7
1420:00-21:00Sterre0Emre1Anne0Anne6
15Totaal15228323413917700
16
17
18NameSuccessfulUnsuccessfulTotalPercentNameSuccessfulUnsuccessfulTotalPercentRow
19Ivan63967%Tobey202100%20
20Tobey202100%Alisa202100%27
21Patricia32560%Ashley202100%28
22Miranda41580%Miranda41580%22
23Dana11250%Ivan63967%19
24Mara13425%Madelief21367%25
25Madelief21367%Patricia32560%21
26Sterre12333%Dana11250%23
27Alisa202100%Dilan11250%30
28Ashley202100%Emre11250%32
29Jill0220%Sterre12333%26
30Dilan11250%Zara12333%31
31Zara12333%Mara13425%24
32Emre11250%Anne13425%34
33Yinthe0110%Jill0220%29
34Anne13425%Yinthe0110%33
35Judith0110%Judith0110%35
36           
37           
38           
39           
40           
Sheet2
Cell Formulas
RangeFormula
A19:A40A19=IFERROR(INDEX($1:$14,INT(AGGREGATE(15,6,(ROW($E$2:$R$14)*100+COLUMN($E$2:$R$14))/ISERROR($E$2:$R$14+1)/($E$2:$R$14<>"")/(COUNTIF($A$18:$A18,$E$2:$R$14)=0),1)/100),MOD(AGGREGATE(15,6,(ROW($E$2:$R$14)*100+COLUMN($E$2:$R$14))/ISERROR($E$2:$R$14+1)/($E$2:$R$14<>"")/(COUNTIF($A$18:$A18,$E$2:$R$14)=0),1),100)),"")
B19:B40B19=IF($A19="","",COUNTIFS($E$2:$Q$14,A19,$F$2:$R$14,">12"))
C19:C40C19=IF($A19="","",COUNTIFS($E$2:$Q$14,A19,$F$2:$R$14,"<=12"))
D19:D40D19=IF($A19="","",B19+C19)
E19:E40E19=IF($A19="","",B19/D19)
G19:J40G19=IF($K19="","",INDEX(A:A,$L19))
K19:K40K19=IFERROR(LARGE(E$19:E$40,ROWS(K$19:K19)),"")
L19:L40L19=IF(K19="","",AGGREGATE(15,6,ROW(E$19:E$40)/(E$19:E$40=K19),COUNTIFS(K$19:K19,K19)))


The A:E formulas are required. If you want to sort by the percentage, then you can use the G:L formulas, which reference the A:E formulas.

If this still does not work on your boss' computer, then it's still possible using CSE formulas and increasingly complicated formulas, but it'd be tough to get someone to write them. I don't have the capability to test them, since CSE works different on the newer versions.
 
Upvote 0
Here's how to do it with functions available in Excel 2016:

Book1
ABCDEFGHIJKLMNOPQR
1TijdenNaamMaNaamDiNaamWoNaamDoNaamVrijNaamZaNaamZo
208:00-09:00Ivan0Tobey20Ivan9Ivan2213
309:00-10:00Ivan0Tobey26Ivan17Ivan2021
410:00-11:00Patricia25Miranda37Dana19Miranda2515
511:00-12:00Mara4Miranda4Ivan30Patricia022
612:00-13:00Madelief13Ivan43Sterre14Patricia625
713:00-14:00Patricia23Mara34Alisa23Mara1224
814:00-15:00Ashley23Patricia15Madelief16Miranda1426
915:00-16:00Madelief2Miranda20Sterre6Jill831
1016:00-17:00Ashley17Ivan17Dilan6Jill4
1117:00-18:00Zara34Emre29Alisa31Zara3
1218:00-19:00Yinthe2Dilan29Anne57Mara12
1319:00-20:00Zara9Dana8Judith6Anne7
1420:00-21:00Sterre0Emre1Anne0Anne6
15Totaal15228323413917700
16
17
18NameSuccessfulUnsuccessfulTotalPercentNameSuccessfulUnsuccessfulTotalPercentRow
19Ivan63967%Tobey202100%20
20Tobey202100%Alisa202100%27
21Patricia32560%Ashley202100%28
22Miranda41580%Miranda41580%22
23Dana11250%Ivan63967%19
24Mara13425%Madelief21367%25
25Madelief21367%Patricia32560%21
26Sterre12333%Dana11250%23
27Alisa202100%Dilan11250%30
28Ashley202100%Emre11250%32
29Jill0220%Sterre12333%26
30Dilan11250%Zara12333%31
31Zara12333%Mara13425%24
32Emre11250%Anne13425%34
33Yinthe0110%Jill0220%29
34Anne13425%Yinthe0110%33
35Judith0110%Judith0110%35
36           
37           
38           
39           
40           
Sheet2
Cell Formulas
RangeFormula
A19:A40A19=IFERROR(INDEX($1:$14,INT(AGGREGATE(15,6,(ROW($E$2:$R$14)*100+COLUMN($E$2:$R$14))/ISERROR($E$2:$R$14+1)/($E$2:$R$14<>"")/(COUNTIF($A$18:$A18,$E$2:$R$14)=0),1)/100),MOD(AGGREGATE(15,6,(ROW($E$2:$R$14)*100+COLUMN($E$2:$R$14))/ISERROR($E$2:$R$14+1)/($E$2:$R$14<>"")/(COUNTIF($A$18:$A18,$E$2:$R$14)=0),1),100)),"")
B19:B40B19=IF($A19="","",COUNTIFS($E$2:$Q$14,A19,$F$2:$R$14,">12"))
C19:C40C19=IF($A19="","",COUNTIFS($E$2:$Q$14,A19,$F$2:$R$14,"<=12"))
D19:D40D19=IF($A19="","",B19+C19)
E19:E40E19=IF($A19="","",B19/D19)
G19:J40G19=IF($K19="","",INDEX(A:A,$L19))
K19:K40K19=IFERROR(LARGE(E$19:E$40,ROWS(K$19:K19)),"")
L19:L40L19=IF(K19="","",AGGREGATE(15,6,ROW(E$19:E$40)/(E$19:E$40=K19),COUNTIFS(K$19:K19,K19)))


The A:E formulas are required. If you want to sort by the percentage, then you can use the G:L formulas, which reference the A:E formulas.

If this still does not work on your boss' computer, then it's still possible using CSE formulas and increasingly complicated formulas, but it'd be tough to get someone to write them. I don't have the capability to test them, since CSE works different on the newer versions.
after trying ur formula and changing the references to my ranges i then only get "Sterre"
Excel Formula:
=IFERROR(INDEX($13:$26;INT(AGGREGATE(15;6;(ROW($C$14:$P$26)*100+COLUMN($C$14:$P$26))/ISERROR($C$14:$P$26+1)/($C$14:$P$26<>"")/(COUNTIF($X$1:$X1;$C$14:$P$26)=0);1)/100);MOD(AGGREGATE(15;6;(ROW($C$14:$P$26)*100+COLUMN($C$14:$P$26))/ISERROR($C$14:$P$26+1)/($C$14:$P$26<>"")/(COUNTIF($X$1:$X1;$C$14:$P$26)=0);1);100));"")
1743349636674.png
 
Upvote 0
Presumably your formula is in X2? These older formulas are much more sensitive to range positioning than the new functions. I believe that all you need to do to fix the formula is change the start of it to:

=IFERROR(INDEX($1:$26;

The way I designed it, the INDEX range should always start at 1, and end at the lower bound of your table. There are ways to adapt the formula like you did, but at the expense of making the formula longer and more complicated. If this does not fix the problem, let me know exactly where your table is, and where you want the results, and I'll adapt it accordingly.
 
Upvote 0

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