Harun24hr
Harun24hr

Reputation: 36965

Need continuous rank of marks

I am trying to get continuous rank of marks from following marks.

100
90
80
70
70
70
60
60
50
45
48
47
37
33

=RANK(A2,$A$2:$A$15)

Above Rank() formula gives rank of mark but discontinuous. Following screenshot will clear what I am try to say.

I am looking for solution with built in excel formulas only. No VBA.

enter image description here

Upvotes: 0

Views: 105

Answers (2)

user10829321
user10829321

Reputation:

As long as the data remains sorted in a descending manner, you really just need a progressive unique count.

=SUMPRODUCT(1/COUNTIF(A$2:A2, A$2:A2))

enter image description here

Upvotes: 1

Joe Taras
Joe Taras

Reputation: 15389

You can try as follow:

=SUMPRODUCT(
    (FREQUENCY($A$2:INDEX(A:A,MATCH(1E+99,A:A)),
    $A$2:INDEX(A:A,MATCH(1E+99,A:A))) > 0) * (A2 <= $A$2:INDEX(A:A,MATCH(1E+99,A:A)+1)) 
)

Result of dense rank built formula

Upvotes: 1

Related Questions