Display top salespeople per client

TommyTenenbaum

New Member
Joined
Jul 25, 2018
Messages
1
Dear all,
I have a file with some raw data where I have 3 columns: Client code / Salesperson / Sales (in $)
I would like to find a way to display the top 3 salesperson for each Client code in another table, with 4 Columns: Client Code / Salesperson 1 / Salesperson 2 / Salesperson 3.
I tried looking for ways to do that online, I found a sumproduct function with some double negatives that helped me to rank the salespeople but I didn't know what to do next with the ranks I got...

Please bear in mind that I don't have 3 clients but 10K+ and 7K+ Salespeople in my raw database.
You can find below a simple example to illustrate what I would like to get.
Thanks a lot for your help!!

Raw data:

Client CodeSalespersonSales
Client 1Jeff200
Client 1Lisa600
Client 2Tom100
Client 2Albert350
Client 2Karen400
Client 3Karen200
Client 3Ana400

Table where I want the names displayed:
Client CodeSalesperson #1Salesperson #2Salesperson #3
Client 1 ? ? ?
Client 2 ? ? ?
Client 3 ? ? ?

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

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I think that your best bet would be to turn your raw data into a Pivot Table. Put Client Code and Salesperson in the 'Rows' section and Sales in the 'Values' section.
 
Upvote 0
I prefer the pivot table also here. If you must see the names instead, sort by client, then sales descending, and:


Excel 2010
ABCDEFGHI
1Client CodeSalespersonSalesClient CodeSalesperson #1Salesperson #2Salesperson #3
2Client 1Lisa600Client 1LisaJeff#NUM!
3Client 1Jeff200Client 2KarenAlbertTom
4Client 2Karen400Client 3AnaKaren#NUM!
5Client 2Albert350
6Client 2Tom100
7Client 3Ana400
8Client 3Karen200
Sheet3
Cell Formulas
RangeFormula
G2{=INDEX($B$1:$B$8,SMALL(IF($A$2:$A$8=$F2,ROW($A$2:$A$8)),COLUMN(A1)))}
Press CTRL+SHIFT+ENTER to enter array formulas.


(you can delete the #NUM!s with F5(Goto)-Special-Errors)
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

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