I need to determine some percentile groups of a bunch of data I have based on certain groupings, so I need to get an array for the PERCENTILE.EXC function, but only the values where a certain condition is met. I cannot post the actual data, so here is a rough example of the same concept.
If I have this dataset:
I need to now get a separate percentile for each combination of group and gender, so I would have the 90th percentile for 1M, 1F, 2M, 2F. I want to essentially only return the Grade value if the group and gender columns meet the condition, that way I can just make a table as such:
And autofill the formula into the table for all possible combinations. Now, my data is significantly longer, with 10's of thousands of lines, 250+ combinations and not sorted, but the formula should remain the same.
I feel like it should be something like this for the first square in my table (1M)
=PERCENTILE(IF(AND(Group = A3, Gender = B2), Grade),0.9), but I just don't know how to properly do this for a large dataset and would love some guidance.


