- Select a range of cells where you want to display the percentile values.
- Type the following formula into the formula bar:
Formula:
=PERCENTILE(IF($K$22:$K$4880=2,$I$22:$I$4880),$A3)
- Press Ctrl + Shift + Enter to enter the formula as an array formula. You should see curly braces {} appear around the formula in the formula bar.
This formula uses the
IF function to create an array of values from column I where the corresponding value in column K is equal to 2. The
PERCENTILE function then calculates the percentile value for this array of values based on the value in cell A3.
Note that array formulas can be resource-intensive, so if you have a large data set, this formula may take some time to calculate. Also, make sure that the range of cells where you enter the formula is large enough to accommodate all the percentile values you want to calculate.