+ Reply to Thread
Results 1 to 4 of 4

Fin the first value greater than and return another cell value

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Fin the first value greater than and return another cell value

    I want to find the first instance of a value in single row range B9:F9 and return the date in the top row directly above in B1:F1

    For instance in range B9:F9 there are a series of numbers constantly increasing from 35-175.
    In cell A11 is the threshold value of 100
    Above in the range B1:F1 are a series of dates
    I want to find the first cell in B9:F9 that is greater than A11 and return the date in the column directly above in B1:F1

    I've attached a sample sheet to illustrate.
    Find the date.xlsx

    I've tried using MATCH just to find the first instance with the -1 value for "greater than" but it keeps returning #N/A

    Thank you in advance for your help!
    Graham

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Fin the first value greater than and return another cell value

    Hi -

    This is just a little bit tricky because of a couple things:

    1. You really have to read the help on Match and the optional greater than/less than thing. It's actually the opposite of what you think you read. You want a +1 for the option. Read the help about 5 times and then you will get what they are saying.

    2. MATCH returns the value your criteria is greater than or equal to. That means to get the first instance that is greater than your criteria, you have to add +1 to whatever MATCH returns. That means you will have some range errors if your threshold is less than the minimum number in your range or greater than the maximum number in your range.

    So, try the following formula:

    =INDEX(B1:F1,1,IF(MIN(B9:F9)>B11,1,IF(MAX(B9:F9)<B11,5,MATCH(B11,B9:F9,1)+1)))

    Hope this helps.
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Fin the first value greater than and return another cell value

    Just a quick follow up. MATCH actually returns the relative column number in this case, not the value, as I misstated earlier.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Fin the first value greater than and return another cell value

    Try this array formula**:

    =INDEX(B1:F1,MATCH(TRUE,B9:F9>B11,0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Format as Date
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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