Rank by Person, without Repeats across people

esseispercipi4

New Member
Joined
Apr 9, 2012
Messages
22
I have a set of data that is salespeople (column A), and how much they sold (column C) by client (Column B). I need to get the top 5 clients by sales for each salesperson; however, no duplicates across salespeople.
So if John Wilkes had $10M to Fun Company as his #1 , and Jane Bridges had $8M to Fun Company as her #1 , John Wilkes would have Fun Company as his #1 , and Jane Bridges would have Fun Company skipped, and her #2 would become her new #1 .

Any idea at all how to do this? I've tried all kinds of helper columns and formulas and still can't work it out.
 

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)
Hello

I am not sure that I have understood it 100%, but probably the below will help you:

In column D you will find the rank by sales person as it would normally happen without looking at your specific requirements.

Then column G would be the ranking matching your requirements, using column E and F as helper columns (could most likely be done in a single formula but a set up like this helps us understand)

Table and formulas below:


Excel 2013/2016
ABCDEFG
1SalesPersonClientAmountRank By Sales Person (RAW)Rank By ClientNew Amount To Rank ByRank By Sales Person (as requested)
2A237732
3A335352
4A9396213962
5A10360413603
6A1116263
7A12155711554
8A13439114391
9B1331313313
10B2414214142
11B5171411714
12B7512115121
13B14158511585
14C229813
15C910832
16C1122422
17D129452
18D3430214302
19D6632116321
20D8256612565
21D11323413234
22D15330313303
Sheet2



<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">D2</th><td style="text-align:left">=COUNTIFS(<font color="Blue">$C$2:$C$22,">"&C2,$A$2:$A$22,A2</font>)+1</td></tr></tbody></table></td></tr></table><br />

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">E2</th><td style="text-align:left">=COUNTIFS(<font color="Blue">$C$2:$C$22,">"&C2,$B$2:$B$22,B2</font>)+1</td></tr></tbody></table></td></tr></table><br />

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">F2</th><td style="text-align:left">=IF(<font color="Blue">E2=1,C2,""</font>)</td></tr></tbody></table></td></tr></table><br />

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">G2</th><td style="text-align:left">=IF(<font color="Blue">F2="","",COUNTIFS(<font color="Red">$F$2:$F$22,">"&F2,$A$2:$A$22,A2,$F$2:$F$22,"<>"</font>)+1</font>)</td></tr></tbody></table></td></tr></table><br />
 
Upvote 0
This is similar to approaches I've attempted and it gets most of the way there.
However, the issue this does not address is:
If Salesperson B sold 2 units to client 16 and Salesperson E sold 1 unit to client 16 as their only sale in the year.
Client 16 would be ranked #6 for Salesperson B, which means it would be excluded from their list. That means it should show up on Salesperson E's list as they are the next highest seller. These formulas skip over them still, meaning that Client 16 is missing entirely from the list of "Top Clients by Salesperson".
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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