Top & Bottom figures to bring from Data to Result sheet

Zubair

Active Member
Joined
Jul 4, 2009
Messages
304
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I have a list of 100 customer contained sales volumes for current & last year and a percentage variance column in Data sheet, from this I want Top & Bottom customers with both year sales based on percentage column. Cell D2 is showing the number of Top and Bottom customers view required it may change from 10 to 20 or 5.

Please help to share formula.

Data Sheet
Customer 865,6734,763
19.09%​
Customer 884,9814,210
18.33%​
Customer 905,7584,931
16.75%​
Customer 914,9734,283
16.11%​
Customer 894,2003,632
15.63%​
Customer 764,2883,709
15.61%​
Customer 924,5133,922
15.08%​
Customer 724,1823,646
14.70%​
Customer 844,6664,123
13.17%​
Customer 684,9124,374
12.31%​
Customer 273,6613,266
12.11%​
Customer 563,9413,518
12.03%​
Customer 554,3783,916
11.80%​
Customer 193,8463,471
10.80%​
Customer 834,2283,827
10.48%​
Customer 44,0893,708
10.27%​
Customer 954,1793,791
10.24%​
Customer 963,6243,291
10.12%​
Customer 734,0193,654
9.99%​
Customer 163,3793,078
9.78%​
Customer 975,4464,967
9.66%​
Customer 203,7063,383
9.55%​
Customer 994,1023,745
9.55%​
Customer 183,3773,085
9.45%​
Customer 983,6813,382
8.86%​
Customer 64,1693,831
8.84%​
Customer 343,4303,156
8.68%​
Customer 473,4543,178
8.68%​
Customer 773,6193,334
8.55%​
Customer 13,1772,933
8.33%​
Customer 663,9353,643
8.04%​
Customer 583,6733,404
7.90%​
Customer 874,0123,725
7.72%​
Customer 783,4923,242
7.69%​
Customer 673,4713,231
7.44%​
Customer 643,4103,182
7.16%​
Customer 123,4583,230
7.07%​
Customer 293,3903,172
6.87%​
Customer 233,2373,035
6.65%​
Customer 253,8713,632
6.57%​
Customer 152,9532,773
6.49%​
Customer 613,1462,963
6.17%​
Customer 934,3834,131
6.09%​
Customer 533,6123,418
5.68%​
Customer 1004,0593,847
5.49%​
Customer 522,8702,722
5.46%​
Customer 172,4722,344
5.45%​
Customer 243,5963,418
5.21%​
Customer 323,1132,960
5.20%​
Customer 503,2383,084
5.01%​
Customer 753,8393,672
4.54%​
Customer 33,6323,483
4.27%​
Customer 693,3653,236
4.00%​
Customer 852,8812,791
3.21%​
Customer 73,6233,521
2.90%​
Customer 53,3323,242
2.78%​
Customer 803,8223,728
2.51%​
Customer 113,1393,062
2.48%​
Customer 363,3453,268
2.36%​
Customer 712,7912,730
2.23%​
Customer 823,8563,772
2.22%​
Customer 793,2463,178
2.15%​
Customer 412,9382,890
1.65%​
Customer 422,7422,699
1.59%​
Customer 23,2773,226
1.58%​
Customer 393,4743,422
1.53%​
Customer 653,2873,245
1.30%​
Customer 623,1503,130
0.63%​
Customer 142,7682,755
0.46%​
Customer 743,1833,171
0.38%​
Customer 332,6642,665
-0.05%​
Customer 443,1023,108
-0.19%​
Customer 592,7952,806
-0.37%​
Customer 282,8952,908
-0.44%​
Customer 93,1183,134
-0.53%​
Customer 222,8232,838
-0.54%​
Customer 452,6982,717
-0.71%​
Customer 102,8442,866
-0.77%​
Customer 372,9533,002
-1.63%​
Customer 312,9022,973
-2.39%​
Customer 813,2753,370
-2.82%​
Customer 542,3242,395
-2.96%​
Customer 943,5503,664
-3.11%​
Customer 402,8002,898
-3.38%​
Customer 83,2153,336
-3.61%​
Customer 462,7992,908
-3.78%​
Customer 432,5342,641
-4.04%​
Customer 512,7792,921
-4.85%​
Customer 702,6372,774
-4.94%​
Customer 492,6802,825
-5.11%​
Customer 482,6282,772
-5.19%​
Customer 303,1033,277
-5.31%​
Customer 632,8943,062
-5.49%​
Customer 132,7082,871
-5.67%​
Customer 212,5912,765
-6.31%​
Customer 352,6282,808
-6.42%​
Customer 382,4342,628
-7.36%​
Customer 572,4692,676
-7.74%​
Customer 602,3152,515
-7.96%​
Customer 262,7983,065
-8.71%​


Result Sheet
Top & Bottom
10
Customer No.Current yearLast year% Diff
Customer 865,6734,763
19.09%​
Customer 884,9814,210
18.33%​
Customer 905,7584,931
16.75%​
Customer 914,9734,283
16.11%​
Customer 894,2003,632
15.63%​
Customer 764,2883,709
15.61%​
Customer 924,5133,922
15.08%​
Customer 724,1823,646
14.70%​
Customer 844,6664,123
13.17%​
Customer 684,9124,374
12.31%​
Customer 482,6282,772
-5.19%​
Customer 303,1033,277
-5.31%​
Customer 632,8943,062
-5.49%​
Customer 132,7082,871
-5.67%​
Customer 212,5912,765
-6.31%​
Customer 352,6282,808
-6.42%​
Customer 382,4342,628
-7.36%​
Customer 572,4692,676
-7.74%​
Customer 602,3152,515
-7.96%​
Customer 262,7983,065
-8.71%​
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You can do so using the LARGE, SMALL, INDIRECT, and MATCH functions.

Results:
1627396976125.png


Formulas:
1627397043481.png


Do note there will be an issue if there are customers with exact values; not sure how to clear it up.

Cell G2 (drag down to G11): =LARGE($B$2:$B$101,F2)
Cell H2 (drag down to H11): =INDIRECT("A" & MATCH(G2,$B$1:$B$101,0))

Cell K2 (drag down): =SMALL($B$2:$B$101,J2)
Cell L2 (drag down): =INDIRECT("A" & MATCH(K2,$B$2:$B$101,0))
 
Upvote 1
Solution

Forum statistics

Threads
1,215,227
Messages
6,123,743
Members
449,116
Latest member
alexlomt

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