+ Reply to Thread
Results 1 to 7 of 7

Find earliest date given a >= threshold

  1. #1
    Registered User
    Join Date
    06-02-2014
    Posts
    2

    Find earliest date given a >= threshold

    I am trying to find a formula that will return the earliest date that a price exceeds a threshold.

    Data.xlsx

    In the attached example,
    Column A - Date
    Column B - Price

    Cell E1 - Price Threshold

    In Cell E2, I'm looking for a formla to return the earliest date that a price exceeds $41 (see cell E1). The result of the formula should be '10/15/02' given the data in columns A&B.

    Thanks in advance for any advice.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find earliest date given a >= threshold

    Maybe this

    =MIN(IF(B2:B24>=E1,A2:A24))

    Format as date

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Find earliest date given a >= threshold

    Here, try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Never use Merged Cells in Excel

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Find earliest date given a >= threshold

    Try this array formula

    =INDEX(A2:A24,MATCH(1,1/(B2:B24>E1),0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Find earliest date given a >= threshold

    If the data can be sorted DEscending by column B (largest dollar value on top)

    =INDEX(A2:A24,MATCH(E1,B2:B24,-1))


    This would be the most efficient method, if you can sort the data.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Find earliest date given a >= threshold

    cblindsey,
    just to explain: mine and AlKey's formula will return same result as long as dates are in ascending order.

    But in this case:

    Please Login or Register  to view this content.
    Mine will return blue result (because it's first date that match criteria) and AlKey's will return red (because it's minimum date that match criteria).

    Use formula that you rater want to return as result in case date's are mixed.

  7. #7
    Registered User
    Join Date
    06-02-2014
    Posts
    2

    Re: Find earliest date given a >= threshold

    Thank you. This works perfectly.

    I've never seen index_match structured this way. If you don't mind, please explain how the function works.

    Thanks,
    Chris

+ 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. Find the earliest date in the column
    By pphg in forum Excel General
    Replies: 4
    Last Post: 08-13-2012, 09:24 AM
  2. Find earliest date if a range of conditions are met
    By Confused_Meme in forum Excel General
    Replies: 2
    Last Post: 03-02-2012, 04:39 PM
  3. Find earliest date based on certain criteria
    By SeanKosmann in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-26-2010, 11:32 AM
  4. Find out the earliest date
    By samirz10 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-27-2009, 04:24 PM
  5. Find Earliest Date based on conditions
    By ShredDude in forum Excel General
    Replies: 6
    Last Post: 07-14-2007, 01:56 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