I have an excel file with 4 Column, need to populate a separte excel sheet with Top 10 customer from column a who have top 10 values in colum b

makvisions

New Member
Joined
Nov 18, 2014
Messages
40
Hello,

I have an excel file with approx. 800 customers in column a, column b is the month it represent, column c is monthly expense
now I want to populate a separate sheet with Top 10 customers in column a and corresponding expense in column b

Below is the sample data, help is appreciated.





[TABLE="width: 475"]
<tbody>[TR]
[TD="align: center"]Sr. #[/TD]
[TD="align: center"]Customer [/TD]
[TD="align: center"]Expense Total [/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Customer 1[/TD]
[TD="align: center"]$48[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]Customer 2[/TD]
[TD="align: center"]$5,250[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]Customer 3[/TD]
[TD="align: center"]$1,732[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]Customer 4[/TD]
[TD="align: center"]$36,157[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]Customer 5[/TD]
[TD="align: center"]$12,479[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]Customer 6[/TD]
[TD="align: center"]$4,828[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]Customer 7[/TD]
[TD="align: center"]$899[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: center"]Customer 8[/TD]
[TD="align: center"]$11,718[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: center"]Customer 9[/TD]
[TD="align: center"]$857[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: center"]Customer 10[/TD]
[TD="align: center"]$26,749[/TD]
[/TR]
[TR]
[TD="align: center"]795[/TD]
[TD="align: center"]Customer 795[/TD]
[TD="align: center"]$16,962[/TD]
[/TR]
</tbody><colgroup><col><col><col></colgroup>[/TABLE]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Assuming that there are no duplicate expenses, try this:


Excel 2010
ABC
1CustomerMonthExpense Total
2Customer 1$48
3Customer 2$5,250
4Customer 3$1,732
5Customer 4$36,157
6Customer 5$12,479
7Customer 6$4,828
8Customer 7$899
9Customer 8$11,718
10Customer 9$857
11Customer 10$26,749
12Customer 795$16,962
Sheet1


Excel 2010
AB
1CustomerExpense Total
2Customer 4$36,157
3Customer 10$26,749
4Customer 795$16,962
5Customer 5$12,479
6Customer 8$11,718
7Customer 2$5,250
8Customer 6$4,828
9Customer 3$1,732
10Customer 7$899
11Customer 9$857
Sheet2
Cell Formulas
RangeFormula
A2=INDEX(Sheet1!A:A,MATCH(B2,Sheet1!C:C,0))
B2=LARGE(Sheet1!$C$2:$C$12,ROWS($A$1:$A1))
 
Upvote 0
If duplicate expense amounts are possible, use this in A2

=INDEX(Sheet1!A$2:A$12,SMALL(IF(Sheet1!C$2:C$12=B2,ROW(Sheet1!C$2:C$12)-(ROW(Sheet1!C$2)-1)),COUNTIF(B$2:B2,B2))) Ctrl Shift Enter
 
Upvote 0
the problem is solved, however when I try to apply to my situation I think i need to expand this formula,

my source is a pivot table which month, division, customer and monthly expense for aprox. 800 customers,

now I want to populate separate tab for each division with top 10 customer, basically every month i move one column further to populate that month data

here is sample data

[TABLE="width: 577"]
<tbody>[TR]
[TD]
Month
[/TD]
[TD]
Divison
[/TD]
[TD]
Customer
[/TD]
[TD]
Total
[/TD]
[/TR]
[TR]
[TD="align: right"]
1/1/2017
[/TD]
[TD]
A
[/TD]
[TD]
Customer 1​
[/TD]
[TD="align: right"]
$1,069​
[/TD]
[/TR]
[TR]
[TD="align: right"]
2/1/2017
[/TD]
[TD]
B
[/TD]
[TD]
Customer 2​
[/TD]
[TD="align: right"]
$277​
[/TD]
[/TR]
[TR]
[TD="align: right"]
3/1/2017
[/TD]
[TD]
C
[/TD]
[TD]
Customer 3​
[/TD]
[TD="align: right"]
$644​
[/TD]
[/TR]
[TR]
[TD="align: right"]
4/1/2017
[/TD]
[TD]
D
[/TD]
[TD]
Customer 4​
[/TD]
[TD="align: right"]
$490​
[/TD]
[/TR]
[TR]
[TD="align: right"]
5/1/2017
[/TD]
[TD]
E
[/TD]
[TD]
Customer 5​
[/TD]
[TD="align: right"]
$13,077​
[/TD]
[/TR]
[TR]
[TD="align: right"]
1/1/2017
[/TD]
[TD]
A
[/TD]
[TD]
Customer 1​
[/TD]
[TD="align: right"]
$2,062​
[/TD]
[/TR]
[TR]
[TD="align: right"]
2/1/2017
[/TD]
[TD]
B
[/TD]
[TD]
Customer 2​
[/TD]
[TD="align: right"]
$324​
[/TD]
[/TR]
[TR]
[TD="align: right"]
3/1/2017
[/TD]
[TD]
C
[/TD]
[TD]
Customer 3​
[/TD]
[TD="align: right"]
$123​
[/TD]
[/TR]
[TR]
[TD="align: right"]
4/1/2017
[/TD]
[TD]
D
[/TD]
[TD]
Customer 4​
[/TD]
[TD="align: right"]
$2,807​
[/TD]
[/TR]
[TR]
[TD="align: right"]
5/1/2017
[/TD]
[TD]
E
[/TD]
[TD]
Customer 5​
[/TD]
[TD="align: right"]
$1,031​
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

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