+ Reply to Thread
Results 1 to 3 of 3

array calculation and percentile

Hybrid View

  1. #1
    Registered User
    Join Date
    06-15-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    2

    array calculation and percentile

    I am trying to calculate the 95th percentile of a subset of a data range. Column A is the hour of the day and column B is the data for each hour.

    I can use this to calculate it successfully when there is only one parameter
    {=PERCENTILE(IF($A$1:$A$100=1,$B$1:$B$100),0.95)}

    but when I try for two parameters using this expression I only get #NUM! as my result.
    {=PERCENTILE(IF((($A$1:$A$100=2)*($A$1:$A$100=1)),$B$1:$B$100),0.95)}

    I can't figure out what is wrong with the 2nd expression.
    Attached Files Attached Files
    Last edited by ianbec; 06-16-2011 at 01:52 AM.

  2. #2
    Registered User
    Join Date
    12-25-2009
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: array calculation and percentile

    hi ianbec
    I think you may use + (or) instead of * (and)
    Try this formula
    {=PERCENTILE(IF((($A$1:$A$100=2)+($A$1:$A$100=1)),$B$1:$B$100),0.95)}

  3. #3
    Registered User
    Join Date
    06-15-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    2

    Thumbs up Re: array calculation and percentile

    Quote Originally Posted by amulee View Post
    hi ianbec
    I think you may use + (or) instead of * (and)
    Try this formula
    {=PERCENTILE(IF((($A$1:$A$100=2)+($A$1:$A$100=1)),$B$1:$B$100),0.95)}
    Brilliant - works perfectly - Thankyou.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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