I have a spread sheet I am building for a competition. I have the formula working to rank with the values I need. But I need to see if there is a way that I can write a formula to only rank members in a group according to a row labeled class? I can send any and all info. Here is the formula I have currently but I would like it to instead of ranking a range of cells by number to rank a range of cells based on a letter that is assigned in the class column. Please let me know if that makes any sense or if you need more info. Thank you very much in advance.

=IF(ISNUMBER(K7),SUM(IF(ISNUMBER(K$7:K$87),(K7>K$7:K$87)/COUNTIF(K$7:K$87,K$7:K$87)))+1,"")

The column with the classification is Column B.

example.jpg