+ Reply to Thread
Results 1 to 11 of 11

Percentile of only negative numbers in a row with both positive and negative numbers

  1. #1
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Percentile of only negative numbers in a row with both positive and negative numbers

    Hi

    I'm trying to find the 25,50 and 75 percentile of numbers below 0, in a row with both negative and positive numbers.
    This is the array formula that I try, but it only returns the value 0...

    =PERCENTILE.EXC(ABS(IF(Day!AZ20:Day!AZ2000<0,Day!AZ20:Day!AZ2000)),0.25)

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    Use this, still entered as an array formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    PERCENTILE.EXC is treating all positive values as zero, not ignoring them -- you left the last term of the IF implicit, so it's returning FALSE, which is being forced to zero by ABS, which is being accepted as a valid argument by the percentile function.

    Try nesting like this:
    Please Login or Register  to view this content.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  4. #4
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    I don't know why that worked now but that formula without ABS I tried many times... apparently it works now, lol
    Thanks for the help

  5. #5
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    Quote Originally Posted by ben_hensel View Post
    PERCENTILE.EXC is treating all positive values as zero, not ignoring them -- you left the last term of the IF implicit, so it's returning FALSE, which is being forced to zero by ABS, which is being accepted as a valid argument by the percentile function.

    Try nesting like this:
    Please Login or Register  to view this content.
    hmmm.... I'm not sure which one I will use now:

    With the first one =PERCENTILE.EXC(IF(Day!AZ20:Day!AZ2000<0,Day!AZ20:Day!AZ2000),0.25)
    I get: -2.36

    with yours {=PERCENTILE.EXC(IF(D16:D50<0,ABS(D16:D50)), 0.25)}
    I get: 0.73

    What I want is a negative number, as I want to find what 25% percentile is (meaning 25% of the values are -2.36 or higher(?) (or would it be lower now, as it's a negative number, I'm confused )

  6. #6
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    When I was experimenting with your formula, I noticed that, in the case where a bunch of zeros values weren't driving it to zero (ie I fed it mostly negative numbers), the ABS was nested such that all the numbers were reflected across the origin and assessed as positive. I assumed that was what you wanted. But if you just want to find the percentile of negative numbers, then no, you don't even want the ABS to be in there.

  7. #7
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    okay, thanks, then its the first one And If I'm correct, then 25% percentile of a negative number, ex. -5, means that 25% of the numbers are between -5 and 0?

  8. #8
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    No.

    PERCENTILE.EXC( {-1, -2, -3, -4, -5}, 0.25) = -4.5

    It's the 25th percentile from the left (negative) end of the numberline.

    I think you may want something like:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    09-20-2018
    Location
    Jakarta
    MS-Off Ver
    google
    Posts
    102

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    I tried all these but doesn't works

  10. #10
    Forum Contributor
    Join Date
    09-20-2018
    Location
    Jakarta
    MS-Off Ver
    google
    Posts
    102

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    =ArrayFormula(PERCENTILE(if(F$13:F$20<0,F$13:F$20),0.1))


    I tried this and its working

  11. #11
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Percentile of only negative numbers in a row with both positive and negative numbers

    Quote Originally Posted by maniacs205 View Post
    I tried all these but doesn't works
    maniacs205, please post a new thread if you have a new question.

+ 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] Negative Numbers in Red Brackets, Positive Numbers in Accounting Format
    By STUARTXL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-24-2015, 08:29 AM
  2. [SOLVED] SUMIF positive and negative numbers - take double a negative number?
    By Zordrail in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2014, 08:34 AM
  3. Convert negative to positive in sheet containing both positive/negative numbers
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 07:52 PM
  4. Replies: 1
    Last Post: 11-20-2008, 01:52 AM
  5. [SOLVED] change 2000 cells (negative numbers) into positive numbers
    By lisbern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2006, 01:00 PM
  6. [SOLVED] convert negative numbers to positive numbers and vice versa
    By bill gras in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-06-2005, 09:45 PM
  7. How to change a series of positive numbers to negative numbers
    By Ellie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM

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