+ Reply to Thread
Results 1 to 9 of 9

[Unsolved] Modifying formula to include quartile (Little urgent)

  1. #1
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    [Unsolved] Modifying formula to include quartile (Little urgent)

    Hi All,

    The following formula helps me to find out the count of positive numbers in Column L, dependent on range based on a condition in Column U.

    IF(AND(U2=1,COUNTIF(U3:U$40000,1)),COUNTIF(L2:INDEX(L3:L$40000,MATCH(1,U3:U$40000,0)-1),">0"),"")

    How do I modify this formula to find just the count of positive numbers in quartile 1 of Column L (or the first 25% cells) for the range derived (as mentioned above, from column U)? Post that quartile 2, 3 & 4 - but if you short on time, please help me with one quartile i'll try to work out the others.

    Can't seem to get my way around it since hours, please help!

    Thanks a ton,
    Dex
    Last edited by DexterG; 02-12-2013 at 11:04 AM.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Modifying formula to include quartile (Little urgent)

    How about adjusting the range to U3:U10000?
    Quang PT

  3. #3
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: Modifying formula to include quartile (Little urgent)

    Thanks bebo, but that won't help.

    In reality there are 38776 cells in all in Column U. But that doesn't matter.

    The formula basically counts values ">0" in Column L every time time 1 appears in column U, till the next 1 appears. And 1 appears nearly 127 times. Thus instead of manually entering ranges each time I would prefer to include the quartile formula in the above formula to find just the count of positive numbers in quartile 1 (or the first 25% cells of each range) in Column L for the range derived each time from column U.

    Hope I've explained well enough and not confused you.

    Regards,
    Dex

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: [Unsolved] Modifying formula to include quartile (Little urgent)

    So you're saying that you want to base the quartile on what row the final cell is in? doesn't matter if it's 0 or positive number? Can it be text?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: [Unsolved] Modifying formula to include quartile (Little urgent)

    This formula defines your 1st quartile range

    INDEX(U3:INDEX(U3:U10000,INT((MATCH(2,U3:U10000,1)-2)/4)),))
    Assumes that you only have 0's and 1's. If you have larger numbers, the 2 in the Match must be increased to be greater than them (i.e 10, or 1E100)
    Hope that helps

  6. #6
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: [Unsolved] Modifying formula to include quartile (Little urgent)

    Thanks for looking ChemistB.

    All are numbers or blank.

    Perhaps the excel attached will give you a better idea of what I am trying to find.

    Book1 -Quartile.xlsx

  7. #7
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: [Unsolved] Modifying formula to include quartile (Little urgent)

    Sorry but that returns a zero. Besides I don't think that is the correct solution I am looking for.

    Can you please have a quick look at the excel attached in the last post above by me. Will help understand what I mean.

    Thanks,
    Dex
    Last edited by DexterG; 02-12-2013 at 12:13 PM.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: [Unsolved] Modifying formula to include quartile (Little urgent)

    Here are the four formulas. They broke things up differently only in 1 group (I highlighted it to show how the formulas broke up the group). All the formulas can be dragged/copied down the sheet
    Q1
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Q2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Q3
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Q4
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    See attachment
    Does that work for you?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-07-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: [Unsolved] Modifying formula to include quartile (Little urgent)

    Thanks ChemistB, works perfect!!!

    Finally relief!! Thanks again!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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