Unique Rank value for a subgroup within a group

The good news is that you can throw away the SUMPRODUCT function and replace it with a pair of COUNTIFS functions. The COUNTIFS can use full column references without detriment and is vastly more efficient than the SUMPRODUCT even with the SUMPRODUCT cell ranges limited to the extents of the data.

In N2 as a standard function,

=COUNTIFS(B:B, B2,M:M, "<"&M2)+COUNTIFS(B$2:B2, B2, M$2:M2, M2)

Fill down as necessary.

      rank_unique_subgroups_sample_data

  Filtered Results

     rank_unique_subgroups_group_A filtered results  rank_unique_subgroups_group_B_ filtered results rank_unique_subgroups_group_C filtered results

Leave a Comment