简体   繁体   中英

Is it possible to use the MATCH and PERCENTILE functions together in excel?

excel表格示例

I am wondering if it would be possible to find where the 85th percentile falls using a FUNCTION like match. In this screenshot the 85th percentile would be at 61. Using MATCH I could find what position the 85th is in to then use if statements to print out where it corresponds to, in this case 61. If there is an easier way to do this without using MATCH please let me know!

edit: the 85th should be found using observations on the far right column. for this example there is 100 observations so the 85th would be 15 observations from the top.

I think this should come with a bit of a health warning - there are 9 ways of calculating a percentile listed here and two different ways in excel - percentile.exc and percentile.inc , neither of which give an exact answer when applied to the 85th percentile of 100 points. Percentile is the same as Percentile.inc.

However let's put this on one side for now and just go with intuition that for

N=100 (the number of points)

P=.15 (the fraction required)

we want to count the first 15 points.

The simplest way to find the corresponding value of your index row is to add a helper column containing the running total of the counts and use index/match to find the matching row for a total count of 15. We should probably consider two cases

(1) The counts match exactly

(2) They don't match exactly so we have to take the next lowest and add one.

The formulas are in G2 (to get NP):

=(1-F2/100)*SUM(C2:C30)

In H2:

=INDEX(A2:A30,IFERROR(MATCH(G2,D2:D30,0),MATCH(G2,D2:D30,1)+1))

在此处输入图像描述

Really this answer is just a starting point because (a) there is a lot more that could be said about the way that the percentile should be estimated and what to do when it works out to be between two points, and (b) the formulas could be more sophisticated - in Excel 365 it could be done fairly easily with a single formula.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM