Dynamic Top/bottom calculation

alizok

Board Regular
Joined
Sep 12, 2002
Messages
88
Office Version
  1. 365
I need the assistance of this group in developing a formula that will dynamically modify dependent on the number of records in the database. I need to figure out the top 10%, top 25%, top 30%, bottom 10%, bottom 25%, and so on. Is there a formula that can automatically calculate this information? Typically, I rank the data, then sort it from smallest to largest, and then determine the average of a certain data set manually depending on the percentage. see attached for more details.

Thank you in advance for all your help
 

Attachments

  • excel_TOP_BOTTOM.png
    excel_TOP_BOTTOM.png
    39.7 KB · Views: 33
Thanks for that.
How about
Fluff.xlsm
ABCD
1
2
3countResults
4Top 105£26,800
5Top 25%13£36,690
6Avg£30,054
7Bottom 25%13£20,667
8Bottom 10%5£14,200
9
10Total count53
11Jan Attn%Jan Attn% RankJan Earning
1297.20%4215,475
13244.40%567,500
14191.50%1378,300
15166.70%1456,875
16215.60%978,850
17151.10%1947,550
18195.60%1169,850
19115.60%3043,225
20137.80%2244,425
21148.90%2045,200
2288.90%4414,950
23153.30%1743,175
2484.40%4717,025
25130.50%2332,575
2686.70%4527,775
27104.40%3322,925
28117.80%2924,175
2997.80%4143,300
3084.40%4712,150
31102.20%3427,350
32128.90%2446,975
3384.40%4723,325
34111.10%3225,425
35102.20%3439,375
36113.60%3130,275
37194.40%1222,225
3883.30%5111,750
3981.00%522,650
4091.50%4354,525
41166.70%1423,650
42151.80%1849,800
43118.60%2835,225
4484.40%4716,275
45100.00%365,050
4686.70%4512,475
47280.00%125,900
48100.00%3629,650
49260.00%213,200
50200.00%1012,425
51220.00%733,550
52100.00%3620,500
53100.00%3617,100
54260.00%214,650
55260.00%212,750
56220.00%78,350
57160.00%1626,325
58120.00%2526,075
5980.00%5317,000
60140.00%2119,850
61100.00%3627,925
62120.00%2510,950
63231.10%639,425
64120.00%2525,575
Main
Cell Formulas
RangeFormula
D4:D8D4=LET(data,SORT(C12:D64),r,ROWS(data),VSTACK(AVERAGE(TAKE(data,r*0.1,-1)),AVERAGE(TAKE(data,r*0.25,-1)),AVERAGE(TAKE(data,,-1)),AVERAGE(TAKE(data,-r*0.25,-1)),AVERAGE(TAKE(data,-r*0.1,-1))))
Dynamic array formulas.
I'm trying to understand this formula. would you please explain it a bit.
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I figured out the formula. Thank you and it's working like a charm. Is there a way to adjust this formula to account for the ties?
 
Upvote 0
Not sure what you mean by accounting for ties, but it would be better to start a new thread for this question.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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