+ Reply to Thread
Results 1 to 7 of 7

Need to find the largest value less than (not equal) to a lookup value using Index-match

  1. #1
    Registered User
    Join Date
    12-19-2015
    Location
    Turkey
    MS-Off Ver
    2010
    Posts
    6

    Need to find the largest value less than (not equal) to a lookup value using Index-match

    Hi dear all

    Need to find the largest value less than (not equal) to a lookup value from a table using Index-match (refer to attachment). As you see my formula in the cell H6 is


    =INDEX(E5:F15,MATCH(H5,E5:E15,1),1)


    and my Lookup value is the the value on cell H5 but when I select the match type value '1' it gaves me the value equal to my lookup value. is there any way to get only the smaller value than the lookup value?
    any help is appreciated. tanx in advance
    Attached Files Attached Files
    Last edited by Farahmand; 12-19-2015 at 10:09 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Need to find the largest value less than (not equal) to a lookup value using Index-mat

    Hi, welcome to the forum

    Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff) - and, depending on what browser is being used, some pics dont even show up on the forum

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.

    Having said that, try removing the ,1.....
    =INDEX(E5:F15,MATCH(H5,E5:E15),1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-19-2015
    Location
    Turkey
    MS-Off Ver
    2010
    Posts
    6

    Re: Need to find the largest value less than (not equal) to a lookup value using Index-mat

    dear Ford
    tanx for your instructions and reply. i uploaded the sample workbook and

    i removed the '1' but the formula still gaves the same result.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Need to find the largest value less than (not equal) to a lookup value using Index-mat

    If it finds a match, it will return that match. Try this...
    =INDEX(E5:E25,MATCH(H5,$E$5:$E$25)-IF(INDEX(E5:E25,MATCH(H5,$E$5:$E$25))=H5,1,0))

  5. #5
    Registered User
    Join Date
    12-19-2015
    Location
    Turkey
    MS-Off Ver
    2010
    Posts
    6

    Re: Need to find the largest value less than (not equal) to a lookup value using Index-mat

    Worked like a charm

    Thank you very much...

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Need to find the largest value less than (not equal) to a lookup value using Index-mat

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

  7. #7
    Registered User
    Join Date
    12-19-2015
    Location
    Turkey
    MS-Off Ver
    2010
    Posts
    6

    Re: Need to find the largest value less than (not equal) to a lookup value using Index-mat

    did what you asked me to do

+ 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. Replies: 4
    Last Post: 04-04-2015, 04:24 AM
  2. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  3. Replies: 2
    Last Post: 04-28-2013, 05:55 PM
  4. Replies: 3
    Last Post: 07-11-2009, 02:58 PM
  5. Replies: 2
    Last Post: 07-02-2006, 05:50 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