Thanks for your quick reply.
But maybe I've made myself not clear. In the attached Excel file, the highlighted (orange) column will be the one I've intended to do (the result I want Excel to return).
The class rank is the rank which is arranged against the class only, not the whole form.
Could you have a little look at the Excel file (_rank2.xlsx)
_rank2.xlsx
Thank you!