# Excel Ranking function

microsoft excel

Can't find specific answer to this problem on other posts.

I have a table with a list of vehicle registrations and a list of times for those vehicles. I want to give each row a rank based on the time allocated to a vehicle registration. Each registration will appear multiple times with a different time of day alongside it.

I want the earliest in the day for a vehicle to be rank 1, second earliest rank 2 … etc.

Screen shot:

=COUNTIFS($B$2:$B$8,B2,$C$2:$C$8,"<="&C2)