Rank within an unsorted list

liybpg

New Member
Joined
Mar 17, 2015
Messages
16
I have a large set of data. Entries are put into categories (e.g. 1 and 2 in table below) and what I am looking to do is to rank entries according to their sales within the category.

An illustrative example below, but my dataset is quite a bit more complicated not additional sorting etc can be done.

Thanks for your help!


ABC
1CategorySalesRank
21 105,000
31 489,391
41 419,478
52 254,024
62 190,338
72 11,836
81 838,957
91 254,024
102 111,964
112 7,500
122 838,957
131 559,304
141 635,060
151 307,069
162 36,848
172 49,184
181 1,398,261
191 444,542
202 447,855
212 33,589
221 3,076,175

<tbody>
</tbody>
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Does the below give the results expected?

Excel Workbook
ABC
1CategorySalesRank
21105,00011
31489,3916
41419,4788
52254,0243
62190,3384
7211,8369
81838,9573
91254,02410
102111,9645
1127,50010
122838,9571
131559,3045
141635,0604
151307,0699
16236,8487
17249,1846
1811,398,2612
191444,5427
202447,8552
21233,5898
2213,076,1751
Sheet8


Edit: slower than Andrew and a worse solution (for 2007+). Will leave it up just as an poor example and in case anyone is using an older version
 
Last edited:
Upvote 0
Sorry to come back to this, but is there any way to have the rankings not skip ranks, if there are repeated values (didn't come up in the table above)

For example, the ranks would go 1, 2, 2, then 4, 5, 6 etc if second and third values are repeated
I want them to go 1, 2, 2, 3, 4, 5 instead

Thank you
 
Upvote 0
Andrew, it does seem to work, thank you very much for that. It takes very long time to calculate though, I have about 30,000 rows so hopefully it would work for that purpose.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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