+ Reply to Thread
Results 1 to 3 of 3

Find the percentile of a value within a range of cells that meet a certain condition

  1. #1
    Registered User
    Join Date
    07-01-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    2

    Find the percentile of a value within a range of cells that meet a certain condition

    I am trying to find the percentile of a value within a range of cells that meet a certain condition.

    example1.PNG

    Using the image above as an example, I'd like to calculate the percentile of certain value (doesn't matter which value for this) for the range of cells where column B has the value 1.

    Calculating percentile is not an issue (use the PERCENTRANK function) but turning that list of 16 numbers into an array of just the 11 with the value of 1 in column B is what I'm finding difficult.

    I believe some combination of the MATCH and INDEX function could do it, but I have not found a way that works. I realise that there is possibly an easy(/easier) solution if VBA or SQL is used, but I would prefer (if possible) a solution that just uses Excel functions.

    Thank you!

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,856

    Re: Find the percentile of a value within a range of cells that meet a certain condition

    It seems that most use the IF() function to create a new array that replaces the unwanted values with FALSE or some text string which the PERCENTRANK() function should ignore.

    To see what is going on, add a helper column for column C. Something like =IF($B2=1,$A2,FALSE) and copy down, then use this helper column in your PERCENTRANK() function.

    When you are comfortable with how that works, then you can nest the IF() array function inside of your PERCENTRANK() function =PERCENTRANK(IF(B2:B17=1,A2:A17,FALSE),x) confirmed with ctrl-shift-enter (standard array entry procedure).

    Does that help?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    07-01-2017
    Location
    England
    MS-Off Ver
    2016
    Posts
    2

    Re: Find the percentile of a value within a range of cells that meet a certain condition

    Yes! This works perfectly, thank you!

+ 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. [SOLVED] Find first cell meet a condition within a range
    By kingi in forum Excel General
    Replies: 6
    Last Post: 01-07-2015, 08:20 PM
  2. Replies: 12
    Last Post: 09-02-2014, 02:07 PM
  3. [SOLVED] Counting cells that fall in a date range AND meet a Yes/No condition
    By pentatonic145 in forum Excel General
    Replies: 2
    Last Post: 05-01-2012, 04:26 PM
  4. MIN of only cells that meet condition
    By jbc242 in forum Excel General
    Replies: 4
    Last Post: 06-27-2011, 12:18 PM
  5. Average cells which meet condition
    By raydaw in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-02-2008, 11:26 AM
  6. find, meet condition, sum range, deduce, find next
    By pinstripe in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-27-2007, 09:30 AM
  7. [SOLVED] In excel counting cells in a range which meet condition ">Xand<X"
    By Uncivil Servant in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-19-2006, 09:45 AM

Tags for this Thread

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