+ Reply to Thread
Results 1 to 4 of 4

Computing Percentiles for multiple conditions

  1. #1
    Registered User
    Join Date
    09-16-2015
    Location
    Winnipeg,Manitoba
    MS-Off Ver
    2007
    Posts
    1

    Computing Percentiles for multiple conditions

    I have a data set that I would like to compute percentiles for multiple conditions.

    Below is a small section of the data I am using. I am trying to find specific percentile scores for all subjects that are Male/14. (eg. 100/90/80/70).

    I have tried this formula (below) but it gives me scores for all age groups neglecting the specific age I am looking for. Does anyone know where I am going wrong? Any help is greatly appreciated.

    Formula Below would be for top score as smaller is better
    =PERCENTILE(IF(OR(B:B="M",C:C=14),F:F,""),0) with Ctrl+Shift +Enter

    Formula Below would be for 90th percentile
    =PERCENTILE(IF(OR(B:B="M",C:C=14),F:F,""),0.1) with Ctrl+Shift +Enter


    Name Gender Age test
    Subject 1 M 10 6.693
    Subject 2 M 12 7.463
    Subject 3 M 15 5.208
    Subject 4 M 16 5.475
    Subject 5 M 18 5.6
    Subject 6 M 11 6.112
    Subject 7 M 15 6.154
    Subject 8 M 14 6.176
    Subject 9 F 14 6.259
    Subject 10 M 11 6.28
    Subject 11 M 11 6.377
    Subject 12 F 13 6.471
    Subject 13 F 15 6.55
    Subject 14 F 12 6.616
    Subject 15 M 12 6.792
    Subject 16 M 13 6.834
    Subject 17 M 14 6.934
    Subject 18 M 14 7.074
    Subject 19 M 13 7.114

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Computing Percentiles for multiple conditions

    Hi.

    First of all, it's a disastrous idea to use entire column references within an array formula. With some functions, e.g. COUNTIF(S)/SUMIF(S), you can get away with referencing entire columns with no detriment to performance, though not with functions which operate over arrays, such as AGGREGATE, SUMPRODUCT, and any construction requiring CSE.

    Try choosing a suitably large, though not too large, upper row reference, e.g. 100.

    Secondly, you appear to be using OR in your attempts. Can you confirm that you want the formula to consider rows where either the entry in column B is "M" or the entry in column C is 14, and not those where both the entry in column B is "M" and the entry in column C is 14?

    If the former:

    =PERCENTILE(IF((B1:B100="M")+(C1:C100=14),F1:F100),0)

    If the latter:

    =PERCENTILE(IF(B1:B100="M",IF(C1:C100=14,F1:F100)),0)

    both entered with CSE.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Computing Percentiles for multiple conditions

    Welcome to the board.

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Name
    Gender
    Age
    test
    Gender
    Age
    Pctl
    2
    Subject 01
    M
    10
    6.693
    M
    14
    6.328
    H2: {=PERCENTILE(IF(($B$2:$B$20 = F2) * ($C$2:$C$20 = G2), $D$2:$D$20), 0.1)}
    3
    Subject 02
    M
    12
    7.463
    4
    Subject 03
    M
    15
    5.208
    5
    Subject 04
    M
    16
    5.475
    6
    Subject 05
    M
    18
    5.600
    7
    Subject 06
    M
    11
    6.112
    8
    Subject 07
    M
    15
    6.154
    9
    Subject 08
    M
    14
    6.176
    10
    Subject 09
    F
    14
    6.259
    11
    Subject 10
    M
    11
    6.280
    12
    Subject 11
    M
    11
    6.377
    13
    Subject 12
    F
    13
    6.471
    14
    Subject 13
    F
    15
    6.550
    15
    Subject 14
    F
    12
    6.616
    16
    Subject 15
    M
    12
    6.792
    17
    Subject 16
    M
    13
    6.834
    18
    Subject 17
    M
    14
    6.934
    19
    Subject 18
    M
    14
    7.074
    20
    Subject 19
    M
    13
    7.114
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Computing Percentiles for multiple conditions

    Hi

    Considere your data in A2:D20.
    Try this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    see the file Percentile.xlsx
    Best regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 11-29-2016, 07:21 AM
  2. Computing Percentiles based on multiple criteria
    By alwaysandalways in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-20-2015, 01:59 AM
  3. Replies: 6
    Last Post: 07-17-2014, 03:08 AM
  4. Percentiles based on multiple criteria
    By MaxwellR in forum Excel General
    Replies: 0
    Last Post: 03-31-2014, 06:49 PM
  5. [SOLVED] Vlookup - Country conditions (Multiple conditions)
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2013, 11:42 AM
  6. Computing Summary Table from Multiple Criteria
    By sdemaere in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2012, 07:59 PM
  7. [SOLVED] percentiles?-How does excel calculates the percentiles worksheet function?
    By Agnes Goris in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-14-2005, 11:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1