MAX(INDEX(MATCH(LARGE(IF(PERCENTILE array formula... OH MY!!!

dwcjmilo

New Member
Joined
Mar 2, 2017
Messages
20
Hey Everyone!

I could use some assistance in getting past a wall I've come upon. I'm needing to calculate the MAX value of a column after scrubbing the top 10% & bottom 10% from a separate staffed column using a Percentile formula.

These two Formulas are pulling the Top & Bottom Staffed person outside of the Top 10% & Bottom 10% staffed as I am wanting:


<PERCENTILE(E6:e16,0.9),e6:e16),1)
<PERCENTILE(E6:e16,0.9),e6:e16),1)
LARGE(IF(E6:E16<<PERCENTILE(E6:e16,0.9),e6:e16),1)
PERCENTILE(E6:E16,0.9),E6:E16),1)
</PERCENTILE(E6:e16,0.9),e6:e16),1)


SMALL(IF(E6:E16><PERCENTILE(E6:e16,0.9),e6:e16),1)
PERCENTILE(E6:E16,0.1),E6:E16),1)</PERCENTILE(E6:e16,0.9),e6:e16),1)



These two array formulas are pulling the MTD Rev % of those two formulas above:


INDEX(C6:C16,MATCH(LARGE(IF(E6:E16<<PERCENTILE(E6:e16,0.9),e6:e16),1),e6:e16,0))
PERCENTILE(E6:E16,0.9),E6:E16),1),E6:E16,0))<PERCENTILE(E6:e16,0.9),e6:e16),1),e6:e16,0))}



INDEX(C6:C16,MATCH(SMALL(IF(E6:E16>PERCENTILE(E6:E16,0.1),E6:E16),1),E6:E16,0))


Here is where I'm stuck... I need to pull all of the MTD Rev % references of each of the people in the middle 80% of the staffed column. Once I can reference each of those dynamically, then I can use a MIN & MAX formula to find the MIN & MAX MTD Rev % for those middle 80% staffed people.

Doing this manually I know the correct MAX MTD Rev % value of the scrubbed staffed people is 73.4% and the MIN is 50.6%

Disclaimer... This is a sample set of data and needs to dynamically calculate from an export of data (approx. 1000 rows) that isn't in the staffed order shown below.

If you have any tips on how I can do this in a single formula, I would be forever grateful! If one cell isn't possible, I "might" be able to use helper cells/columns, but this is highly discouraged.

MTD Rev %
(Column C)
</p>

MTD Revenue
(Column D)
</p>

Staffed Hours
(Column E)
</p>

65.2%</p>

$358,479.00</p>

170.57</p>

85.4%</p>

$469,398.00</p>

146.74</p>

51.7%</p>

$284,383.00</p>

146.48</p>

68.6%</p>

$377,265.00</p>

144.32</p>

70.6%</p>

$387,962.00</p>

141.08</p>

73.4%</p>

$403,162.00</p>

137.77</p>

50.6%</p>

$277,928.00</p>

136.37</p>

72.5%</p>

$398,670.00</p>

129.75</p>

66.7%</p>

$366,786.00</p>

122.84</p>

62.3%</p>

$342,485.00</p>

120.72</p>

0.4%</p>

$2,279.00</p>

0.00</p>

<tbody>
</tbody>
</PERCENTILE(E6:e16,0.9),e6:e16),1),e6:e16,0))}
</PERCENTILE(E6:e16,0.9),e6:e16),1),e6:e16,0))
</PERCENTILE(E6:e16,0.9),e6:e16),1)
</PERCENTILE(E6:e16,0.9),e6:e16),1)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Is this an input sample? If it's, is it complete? And care also the output exhibit?

Hey Aladin,

Those 3 columns are from a data export from Oracle/Hyperion program. The full export has other data in the A, B columns prior to this data and additional data in the F, G, etc columns. This sample set is 11 rows of data from what would be up to 1000 rows of data. Fortunately, if a formula works for this 11-row set, it would work for the 1000 row set. As far as the output exhibit, I would need to clarify what you mean by this to accurately answer your question.
 
Upvote 0
Hey Aladin,

Those 3 columns are from a data export from Oracle/Hyperion program. The full export has other data in the A, B columns prior to this data and additional data in the F, G, etc columns. This sample set is 11 rows of data from what would be up to 1000 rows of data. Fortunately, if a formula works for this 11-row set, it would work for the 1000 row set. As far as the output exhibit, I would need to clarify what you mean by this to accurately answer your question.

You write: I need to pull all of the MTD Rev % references of each of the people in the middle 80% of the staffed column. I don't see any people anywhere in the exhibit you posted. That's the reason why I asked whether this was an example data sample...
 
Upvote 0
You write: I need to pull all of the MTD Rev % references of each of the people in the middle 80% of the staffed column. I don't see any people anywhere in the exhibit you posted. That's the reason why I asked whether this was an example data sample...

Hey Aladin,

The middle 80% of the staffed column would be these people:

51.7%$284,383.00146.48
68.6%$377,265.00144.32
70.6%$387,962.00141.08
73.4%$403,162.00137.77
50.6%$277,928.00136.37
72.5%$398,670.00129.75
66.7%$366,786.00122.84

<tbody>
</tbody>

So I need to find a way to pull that first column for each of those people based on them being the middle 80% of the staffed column. This is entirely doable if the staffed column exported in the order shown and would never be resorted. But the export file Im using is essentially the sample set I listed but a jumbled order in the staffed column.

I'm sorry if Im not explaining myself thoroughly enough... I know this is a difficult request and I'm currently experimenting with INDIRECT functions while waiting on suggestions from the forum here.
 
Upvote 0
You write: I need to pull all of the MTD Rev % references of each of the people in the middle 80% of the staffed column. I don't see any people anywhere in the exhibit you posted. That's the reason why I asked whether this was an example data sample...

Hey Aladin,

I was able to solve this a few mins ago... here are the Array formulas:

MAX(IF(E6:E16<=LARGE(IF(E6:E16<PERCENTILE(E6:E16,0.9),E6:E16),1),C6:C16))

MIN(IF(E6:E16>=SMALL(IF(E6:E16>PERCENTILE(E6:E16,0.1),E6:E16),1),C6:C16))
 
Upvote 0
Hey Aladin,

I was able to solve this a few mins ago... here are the Array formulas:

MAX(IF(E6:E16<=LARGE(IF(E6:E16<percentile(e6:e16,0.9),e6:e16),1),c6:c16))

MIN(IF(E6:E16>=SMALL(IF(E6:E16>PERCENTILE(E6:E16,0.1),E6:E16),1),C6:C16))

I intended to come back on this... What follows is how I would do it. Perhaps you did the same way...

Row\Col
C​
D​
E​
F​
G​
H​
I​
2​
146.48​
3​
122.84​
4​
7​
5​
MTD Rev % MTD Revenue Staffed Hours MTD Rev % MTD Revenue Staffed Hours
6​
65.20% $358,479.00 170.57 51.70% $284,383.00
146.48​
7​
85.40% $469,398.00 146.74 68.60% $377,265.00
144.32​
8​
51.70% $284,383.00 146.48 70.60% $387,962.00
141.08​
9​
68.60% $377,265.00 144.32 73.40% $403,162.00
137.77​
10​
70.60% $387,962.00 141.08 50.60% $277,928.00
136.37​
11​
73.40% $403,162.00 137.77 72.50% $398,670.00
129.75​
12​
50.60% $277,928.00 136.37 66.70% $366,786.00
122.84​
13​
72.50% $398,670.00 129.75
14​
66.70% $366,786.00 122.84
15​
62.30% $342,485.00 120.72
16​
0.40% $2,279.00 0
17​

<tbody>
</tbody>

In I2 control+shift+enter, not just enter:

</percentile(e6:e16,0.9),e6:e16),1),c6:c16))
=MAX(IF(E6:E16<PERCENTILE(E6:E16,0.9),E6:E16))

In I3 control+shift+enter:

=MIN(IF(E6:E16>PERCENTILE(E6:E16,0.1),E6:E16))

In I4 just enter:

=COUNTIFS($E$6:$E$16,"<="&I2,$E$6:$E$16,">="&I3)

In G6 control+shift+enter, copy across to H6, and down:

=IF($I6="","",INDEX(C$6:C$16,SMALL(IF($E$6:$E$16=$I6,ROW(C$6:C$16)-ROW(C$6)+1),COUNTIFS($I$6:$I6,$I6))))

In I6 control+shift+enter and copy down:

=IF(ROWS($I$6:I6)>$I$4,"",LARGE(IF($E$6:$E$16<=$I$2,IF($E$6:$E$16>=$I$3,$E$6:$E$16)),ROWS($I$6:I6)))

Note. If this set up is to heavy to execute, we can speed it up by means of an additional output range.
 
Upvote 0

Forum statistics

Threads
1,214,531
Messages
6,120,073
Members
448,943
Latest member
sharmarick

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