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:
[TABLE="width: 387"]
<colgroup><col><col span="2"><col></colgroup><tbody>[TR]
[TD]Client Code[/TD]
[TD]Salesperson[/TD]
[TD]Sales[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Jeff[/TD]
[TD]200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Lisa[/TD]
[TD]600[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Tom[/TD]
[TD]100[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Albert[/TD]
[TD]350[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Karen[/TD]
[TD]400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD]Karen[/TD]
[TD]200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD]Ana[/TD]
[TD]400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
Table where I want the names displayed:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client Code[/TD]
[TD]Salesperson #1[/TD]
[TD]Salesperson #2[/TD]
[TD]Salesperson #3[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[/TR]
</tbody>[/TABLE]
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:
[TABLE="width: 387"]
<colgroup><col><col span="2"><col></colgroup><tbody>[TR]
[TD]Client Code[/TD]
[TD]Salesperson[/TD]
[TD]Sales[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Jeff[/TD]
[TD]200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD]Lisa[/TD]
[TD]600[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Tom[/TD]
[TD]100[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Albert[/TD]
[TD]350[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD]Karen[/TD]
[TD]400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD]Karen[/TD]
[TD]200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD]Ana[/TD]
[TD]400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
Table where I want the names displayed:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Client Code[/TD]
[TD]Salesperson #1[/TD]
[TD]Salesperson #2[/TD]
[TD]Salesperson #3[/TD]
[/TR]
[TR]
[TD]Client 1[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[/TR]
[TR]
[TD]Client 2[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[/TR]
[TR]
[TD]Client 3[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[TD] ?[/TD]
[/TR]
</tbody>[/TABLE]