I can't see anything in your thread that tells us how you wanted #N/A to be ranked, so we had to guess.
Looking at your latest sample I assume that you want #N/A at the top, in which case, please follow post #17 (the new formula is based on the same sample file, not the most recent one), replacing the first formula with this one.
=COUNTIFS($C$5:$C$57,">"&IFERROR(C5,1E+100))+IF(ISNA(D5),0,COUNTIF($C$5:$C$57,"#N/A")+COUNTIFS($C$5:$C$57,C5,$D$5:$D$57,">"&D5))+COUNTIFS(C$4:C4,C5,D$4:D4,D5)+1
Bookmarks