Average of the top 25%

brandon20

Board Regular
Joined
Feb 12, 2014
Messages
203
Hi, I am trying to find the top 25% fastest times of these items then find the average.

I know I can find the average by doing an averageifs
=(AVERAGEIFS(C2:C25,A2:A25,"MA",B2:B25,"NW"))

But now I need to separate out the Top 25% fastest times.
Then take the average again. How would I do this in one equation?
Would I use the quartertile function?

Any help is greatly appreciated. Thanks!




ResTypetime
MAST37.5
LBNW48.1
MAST50.4
LBNW55.2
MAST43.375
ZUNW53.375
MAST36
ZUNW166.5417
MAST25.85417
MAST25.625
MAST31.375
MAST38.875
MAST53.64583
RTNW79.4375
MAST45.9
MAST23.125
MAST32.79167
MAST40.27083
LBNW43.416
MANW66.375
UBNW59.20833
LBNW58.6666
LBNW59.39583
UBST40.77083

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Here are some ideas. COULDN'T THINK OF A WAY TO GET IT ALL INTO ONE FORMULA.....


Excel 2012
ABCDEFG
1ResTypetimeSub CalcCheck Answer
2MAST37.561166.5417
3LBNW48.1Answer279.4375
4MAST50.481.60416366.375
5LBNW55.2459.39583
6MAST43.375559.20833
7ZUNW53.375658.6666
8MAST36Average81.60416
9ZUNW166.5417
10MAST25.85417
11MAST25.625
12MAST31.375
13MAST38.875
14MAST53.64583
15RTNW79.4375
16MAST45.9
17MAST23.125
18MAST32.79167
19MAST40.27083
20LBNW43.416
21MANW66.375
22UBNW59.20833
23LBNW58.6666
24LBNW59.39583
25UBST40.77083
Sheet1
Cell Formulas
RangeFormula
D2=ROUND(COUNT(C2:C25)/4,1)
D4{=AVERAGE(LARGE(C2:C25,{1,2,3,4,5,6}))}
G2=LARGE($C$2:$C$25,F2)
G3=LARGE($C$2:$C$25,F3)
G4=LARGE($C$2:$C$25,F4)
G5=LARGE($C$2:$C$25,F5)
G6=LARGE($C$2:$C$25,F6)
G7=LARGE($C$2:$C$25,F7)
G8=AVERAGE(G2:G7)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks for your help everybody. I think VBA Geek's works best for what I am trying to do.

I was wondering if there was a way to single out the MA in the column A, and then find the the average of the top 25 percent.

To clarify, this formula works
=averageifs(c2:c25,c2:c25,">="&percentile(c2:c25,0.75))


but I need to be able to find the average of the top 25 percent of "MA" in column A.

I also need to be able to find the top 25 percent of "MA" in column A that is also a "NW" in column B.

I understand that these the data I gave will not give a very important number but this is just a small sample of my data.


Thanks for any additional help.
 
Upvote 0
try:

=AVERAGEIFS(C2:C25,A2:A25,"MA",B2:B25,"NW",C2:C25,">="&PERCENTILE(IF(A2:A25="MA",IF(B2:B25="NW",C2:C25)),0.75))

Control shift enter


 
Upvote 0
THANKS!!!!

That works great.

I hate to do this to you, but there is no way to use AverageIFS for two different values in the same column correct?
I have tried this before and had to go another route.

We just looked up "MA" in column A and "NW" in column B.

What if I wanted to look up "MA" AND "LB" in column A and "NW" in column B.

AverageIFS function does not have this ability right?

I have used an Average(IF((A2:A25="MA")+(A2:A25="LB"),C2:C25)) to get the average before but did not know how to through in column B "NW".

I would like to think that averageIFS can handle this but Im not sure.
 
Upvote 0
Try this, also Control Shift Enter


=AVERAGE(IF(A2:A25={"MA","LB"},IF(B2:B25="NW",IF(C2:C25>=PERCENTILE(IF(A2:A25={"MA","LB"},IF(B2:B25="NW",C2:C25)),0.75),C2:C25))))
 
Upvote 0
THANKS!

that really clears up some issues I was having inside this average(If equations.

so in order to put two different variables from the same row into the equation I just need to put the {"MA","LB"} brackets around them. At least this is what seems to work.
Much more efficient than adding the two together.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,066
Members
449,090
Latest member
fragment

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