How to Count Duplicates sequentially with RANK function

thenapolitan

Board Regular
Joined
Sep 5, 2014
Messages
52
Hi All,

I understand the idea of using something like this where Column C = RANK(A1,$A$1:$A$8,1) & Column D =RANK(A1,$A$1:$A$8,1)+COUNTIF($A$1:A1,A1)-1

But what I really want is to order the rank data without skipping a number, such as Column E.

ColumnAColumnBColumnCColumnDColumnE
22111
3*222
31232
45443
55554
65665
75776
85887

<colgroup><col span="5"></colgroup><tbody>
</tbody>


Any ideas on how to do this?

Thanks,

Chris
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
In column E, try

=IF(ISNUMBER(MATCH(B2,$B$1:B1,0)),VLOOKUP(B2,$B$1:C1,2,0),RANK(C2,$C$2:$C$5,1))

Where Column B houses numbers to rank

Where column C house

=IF(ISNUMBER(MATCH(B2,$B$1:B1,0)),"",RANK(B2,$B$1:$B$5))

Adjust your ranges
 
Upvote 0
You could use this "array formula" in E1

<a1,a$1:a$8),a$1:a$8),1))+1
=SUM(IF(FREQUENCY(IF(A$1:A$8< A1,A$1:A$8),A$1:A$8),1))+1

confirm with CTRL+SHIFT+ENTER and copy down</a1,a$1:a$8),a$1:a$8),1))+1
 
Upvote 0
Ended up using the "array formula" version of this and it works great! Thanks so much barry.

You could use this "array formula" in E1

<a1,a$1:a$8),a$1:a$8),1))+1
=SUM(IF(FREQUENCY(IF(A$1:A$8< A1,A$1:A$8),A$1:A$8),1))+1

confirm with CTRL+SHIFT+ENTER and copy down
</a1,a$1:a$8),a$1:a$8),1))+1
 
Upvote 0
I used this formula in B3 after filling the initial rank for B2.


<tbody>
</tbody>
=IF(A3=A2,B2,B2+1)

DataRank
101
101
92

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top