In Excel I have results data that is ordered in a list similar to below. I am looking for a formula to rank the 'class' column. I have come up with the following which seems to work, but without considering the 'unique' RaceID column.
={COUNTIF(Class,"<"&C2)+SUM(IF(C2=$C$2:C2, 1, 0))-(SUMPRODUCT(--(C2>C$2:C$11))+1)}
Where 'Class' refers to 'C:C'.
Unfortunately this would produce a result of '4' for Class A in cell E7, even though Daniel was the race winner for RaceID 0002.
The fifth column is the desired output.
Col A Col B Col C Col D Col E
RaceID Overall Pos Class Name Class rank
0001 1 A Jack 1
0001 2 A Matt 2
0001 3 A Daniel 3
0001 4 B Gordon 1
0001 5 B Phillip 2
0002 1 A Daniel 1
0002 2 A Matt 2
0002 3 B Günther 1
0002 4 B Gordon 2
0002 5 A Jack 3
What I need is to be able to extend this formula to only rank when the RaceID values match the current row. I'm sure this shouldn't be that difficult, but I'm struggling to complete the formula.