Distributing students across classes based on marks

yashgt

New Member
Joined
Jul 9, 2018
Messages
5
NameMarksRankClass
Eddie
20​
6​
C
Tom
10​
10​
A
Jenny
30​
4​
A
Riva
40​
3​
C
Andy
50​
2​
B
Mark
5​
11​
B
Sally
78​
1​
A
Jack
15​
8​
B
****
15​
8​
C
Harry
20​
6​
A
Dom
30​
4​
B
In the above pic, the students are expected to be distributed across classes A, B and C, based on their marks. The student with highest marks goes in A. The once with next highest goes in B. The next highest goes in C. The next goes again to A and so on. What should be the formula to be used in Excel 2013 and above for calculating the Class?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,614
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=CHOOSE(MOD(C2+COUNTIFS(C$2:C2,C2)+1,3)+1,"A","B","C")
 

Watch MrExcel Video

Forum statistics

Threads
1,129,677
Messages
5,637,735
Members
416,981
Latest member
PLonchar

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
Top