Ranking within in ranges

A

ah

I need a formula that will allow me to rank one column of numbers based on a
value in another column. e.g. If I have values in column A and countries in
column B. I want to rank the values by country in other words each country
will have a #1 etc. also the number of values by each country will be
different

thanks

ah
 
D

daddylonglegs

Assuming you have data in rows 2 to 100 use this formula in row 2 and
copy down

=SUMPRODUCT(--(A$2:A$100>A2),--(B$2:B$100=B2))+1
 
Top