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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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

thenapolitan

Board Regular
Joined
Sep 5, 2014
Messages
52
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

jgonzaless

New Member
Joined
Mar 30, 2017
Messages
1
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,195,719
Messages
6,011,290
Members
441,599
Latest member
Jribas

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
Top