array formula using percentiles

midsession

Board Regular
Joined
Oct 12, 2006
Messages
70
Hello MrExcel, my knowledge of array formulae isn't all it should be so I need some help.

I'm trying to find the tenth and ninetieth percentiles in two combined datasets

[
Book1
ABCDEF
186.666670
291.71
383.31
483.30
583.31
691.70
766.71
875.01
958.31
1075.00
1183.30
1275.01
1358.30
1475.00
1583.30
1675.00
1775.00
18100.00
1975.01
2083.31
2191.71
2266.71
2358.30
2483.31
2550.00
2683.30
Sheet1
Cell Formulas
RangeFormula
D1{=PERCENTILE.EXC(((A$2:A$26)*($B$2:$B$26=1)), 0.9)}
F1{=PERCENTILE.EXC(((A$2:A$26)*($B$2:$B$26=0)), 0.1)}
Press CTRL+SHIFT+ENTER to enter array formulas.
]

Find the 90th percentile for the items in col A where col B is 1
and
Find the 10th percentile for the items in col A where col B is 0

I had thought the answer was
=PERCENTILE.EXC(((A$2:A$26)*($B$2:$B$26=1)), 0.9)
and
=PERCENTILE.EXC(((A$2:A$26)*($B$2:$B$26=0)), 0.1)

however there's no way F1 should be zero in that case

When I disentangle the datasets to check, they give different results (which I assume are correct)

[
Book1
IJKLMN
191.6666753.33333
291.783.3
383.391.7
483.375.0
566.783.3
675.058.3
758.375.0
875.083.3
975.075.0
1083.375.0
1191.7100.0
1266.758.3
1383.350.0
1483.3
Sheet1
Cell Formulas
RangeFormula
J1{=PERCENTILE.EXC((I$2:I$13), 0.9)}
N1{=PERCENTILE.EXC((M$2:M$14), 0.1)}
Press CTRL+SHIFT+ENTER to enter array formulas.
]

So now I realise my understanding of how array formulas work is nonsense - can anyone help with the original formulae though?

Thanks in advance
midsession
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi,

an attempt:

Code:
=PERCENTILE.EXC(IF(B2:B26=1,A2:A26),0.9)

Code:
=PERCENTILE.EXC(IF(B2:B26=0,A2:A26),0.1)

Array entered

Regards
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,087
Messages
6,123,050
Members
449,092
Latest member
ikke

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