+ Reply to Thread
Results 1 to 6 of 6

Thread: Condtional Range - Drawdown Ranking

  1. #1
    Registered User
    Join Date
    05-20-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Smile Condtional Range - Drawdown Ranking

    hi guys,

    i'm kinda stuck here. attached u'll find a sheet that contains data in coulumns a to c.

    i wanna do the following: i want to create a ranking of the five highest values in column a and the corresponding values in columns b and c.
    a contains drawdowns, b the drawdownperiod and c the date the drawdown began.

    for example: highest value in column a is 5,20196, the drawdown period is 456 days, which started on 05/17/2006.
    in excel i can easily put up a ranking, but with that given data i have two problems:
    1. i find the drawdown of 5,20196 several times in the same period (456 days)
    2. the second highest value in column a is in the same drawdownperiod (456 days), which i am not interested in.

    i need the second highest value in column a, which is not in the same drawdownperiod of the highest value (5,20196 days) ...and so on.
    that should be 4,3843 (period=64 days, starting 13.11.08)


    so far i tried alot of stuff with sumproduct and max if, but it doesn't work.
    hope u can help me on that! :/

    many thx

    dan
    Attached Files Attached Files
    Last edited by dan_hibiki; 04-08-2011 at 03:23 AM. Reason: solved

  2. #2
    Forum Guru Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    2,784

    Re: Condtional Range - Drawdown Ranking

    This array formula will give you the MAX() found in A:A where B:B value does not equal 456.

    =MAX(IF(B:B<>456,A:A))

    entered with Ctrl+Shift+Enter

    you can replace the 456 with a cell refernce that holds that value

  3. #3
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,637

    Re: Condtional Range - Drawdown Ranking

    Note: can't use whole column references in Excel 2003 with that formula though
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  4. #4
    Forum Guru Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    2,784

    Re: Condtional Range - Drawdown Ranking

    Thanks NBVC
    I was just going to add that because when I saved the sample file that message popped up.

    Here is the array formula for the 3rd highest:

    =MAX(IF((B1:B3000<>G2)*(B1:B3000<>G3),A1:A3000))

    where G2 holds the 456 value and G3 holds the 64 value (from previous formula)

    adjust the ranges as necessary

    Here is your file with the formulas I used to get the top 3 results
    Attached Files Attached Files
    Last edited by Cutter; 04-07-2011 at 12:14 PM.

  5. #5
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,593

    Re: Condtional Range - Drawdown Ranking

    Another approach maybe?

    Try this
    In D2
    =IF(C2<>C3,IF(C2="","",C2),"")
    In E2
    =IF(OR(D2="",D2=0),"",MAX(INDIRECT("A"&ROW()-(COUNTIF(C:C,C2)-1)&":A"&ROW())))
    In E2
    =IF(E2<>"",IF(RANK(E2,E:E)<=$G$1,RANK(E2,E:E),""),"")
    Drag/Fill all three Down

    Put a number in G1 to call the Last Rank you are interested in, then filter Column F for non-blanks

    A method without filters is in Sheet2

    Use the grouping buttons to show hidden columns.

    Do you need Column B, or is in an automatic download?

    Hope this helps.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  6. #6
    Registered User
    Join Date
    05-20-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Condtional Range - Drawdown Ranking

    omg! u guys are awesome! thank u very much!!! both solutions work fantastic...

    greetz
    dan

+ 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.2.0