Ranking in three groups

John 4348

Board Regular
Joined
Apr 21, 2022
Messages
78
Office Version
  1. 2010
Platform
  1. Mobile
Hello everyone
I am trying to rank students in 3 groups, for example (A2:A21,A22:A43,A44:62).I don't use table and I also would like the Range works dynamic.
If two students have the same score they will receive the same rank.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
try:

I'm not sure what you mean by dyamic in this context. But this will update when you put new values in column A.

mr excel questions 12.xlsm
AB
11518
2277
31915
4285
51716
6285
71219
82014
92211
102310
11258
12332
13332
141120
151716
162112
17258
182112
19294
20371
211518
222912
23381
241419
25381
26364
27347
283010
292415
301221
311518
32364
33339
341717
351916
361320
37364
382514
392813
40347
41373
421022
433010
44247
451315
461315
471315
481119
49401
50401
511513
521315
53401
54208
551612
56374
571811
58335
59208
60326
611513
62208
Sheet12
Cell Formulas
RangeFormula
B1:B21B1=RANK.EQ(A1,$A$2:$A$21,0)
B22:B43B22=RANK.EQ(A22,$A$22:$A$43,0)
B44:B62B44=RANK.EQ(A44,$A$44:$A$62,0)
 
Upvote 0
Thank you
1. By Dynamic, I mean when the range increases from (B1:B22) to (B1:B25),it will update.
2. By the same rank, I mean for example: score 20 = 1 , 19 = 2 ,18 =3
not 20=1, 20=1, 20= 1, 19 =4
 
Upvote 0
@John 4348 , i have no idea what you mean by the last two inequalities?
And you have never had any data in column B, so I'm not sure what youre asking when you say the range increases.
My column B is the rank.eq function you asked for in the three ranges in column A.
 
Upvote 0
Since your ranges are
a) Not the same size as each other, and
b) Not fixed in size
you would need some way to indicate which rows belong to which of the 3 groups.
Here is one way

23 03 02.xlsm
ABC
1GroupValueRank
21120
311915
41616
51557
612313
711716
81951
91409
101818
111409
1213911
1312412
1411617
151951
161635
1712313
181219
191673
201664
211458
222851
232579
242783
2521220
262812
2723911
2822317
2923113
3021719
3124710
3222816
3323014
3423014
352735
362688
3723812
3821220
3921818
402222
412774
422707
432735
4432414
453794
4632811
473822
483676
493538
503118
513416
5233210
533118
543667
5532613
563981
5731915
583695
593489
603803
6132811
623416
63 
64 
65 
66 
67 
68 
69 
70 
Rank in groups
Cell Formulas
RangeFormula
C2:C70C2=IF(A2="","",SUMPRODUCT((A$1:A$100=A2)*(B2<B$1:B$100))+1)
 
Upvote 0
I apologize all.
I explain. I rank the three groups of students, once each group may be 18 students, more or less. when they increase or decrease, I exchange the range manually. for example: group 1 from A2:A20 to A2:A25 and group 2 from A21:A42 to A26:A47. I would like the range exchanges automatically. I send 3 pictures.
 

Attachments

  • 12.JPG
    12.JPG
    34.3 KB · Views: 6
  • 13.JPG
    13.JPG
    56.9 KB · Views: 7
  • 14.JPG
    14.JPG
    61.9 KB · Views: 6
Upvote 0
Looks like my previous suggestion was close but that when there are equal ranks you do not want to skip any numbers before the next rank value.
In that case try this formula. Note that this is an array formula and in your 2010 Excel version it must be confirmed with Ctrl+Shift+Enter, not just Enter before you copy it down.

23 03 02.xlsm
ABC
1GroupValueRank
21201
31174
41165
51192
61183
71201
82201
92155
102183
112174
122192
133192
143145
153164
163173
173201
18 
19 
20 
Rank in groups (2)
Cell Formulas
RangeFormula
C2:C20C2=IF(A2="","",COUNT(IF(A$2:A$100=A2,IF(B$2:B$100>B2,IF(MATCH(B$2:B$100,IF(A$2:A$100=A2,B$2:B$100),0)=ROW(B$2:B$100)-ROW(B$2)+1,1,NA()))))+1)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,216,091
Messages
6,128,779
Members
449,468
Latest member
AGreen17

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