Search code examples
excelgroupingranking

Unique rank in Excel


I have a spreadsheet where I want a Unique rank with groups, I've been searching online but can't quite get it right, this is what I want (there are 2000 rows in total) in the rank column

enter image description here

I've used sumproduct, which is working but when I try to use COUNTIF, it does seem to respect the group


Solution

  • Best I can figure out you want:

    =COUNTIFS(A:A,A2,B:B,">"&B2)+COUNTIFS(A2:A$2000,A2,B2:B$2000,B2)
    

    enter image description here