Question

A B 1 5 2 10 2 15 3 20

I want to calculate percentile for a column of values B if A is equal say 2. That's I want to get range of B2,B3 and calculate percentile of this.

So basically the question is: how do I select range in one column with the checking with another column?

I.e. it works perfectly with SumIf and CountIf, I just need the same with PercentileIf. Thx!

Was it helpful?

Solution

This will give you the 25th percentile of A1:A6 for all cells where the value in B1:B6 equals 2:

=PERCENTILE.INC(IF(B1:B6=2,A1:A6,""),0.25)

It's an array formula and must be entered with Ctrl-Shift-Enter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top