+ Reply to Thread
Results 1 to 8 of 8

Need first approximate match returned

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    Knoxville, TN
    MS-Off Ver
    Excel 2010
    Posts
    9

    Need first approximate match returned

    I need to find a value based on the value in another column (i.e. lookup table). What I have struggled with is that it needs to be the first match and an approximate match. I though it could be done with index-match, but I can't meet both requirements above through an index-match function. Or, at least I have been unsuccessful. The lookup array does not linearly ascend either. It increases, then decreases, then increases again. Any suggestions?

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

    Re: Need first approximate match returned

    Post some sample data and tell us what result you expect.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    07-05-2012
    Location
    Knoxville, TN
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need first approximate match returned

    It is probably better stated as I want to identify the first approximate match. This value will then be used in an index formula. The match array increases, then decreases, and then increases again. Example: need the c value associated w/ b. If b was 3, I would want it to return a c value of 3, because it is associated with the minimum a.

    a b c
    1 1 1
    2 2 2
    3 2.9 3
    4 4 4
    5 4 5
    6 3 6
    7 4 7
    8 5 8

  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: Need first approximate match returned

    As long as your data starts out as a sorted ascending list this should work:

    E1 = 3

    =INDEX(C1:C8,MATCH(E1,B1:B8))

  5. #5
    Registered User
    Join Date
    07-05-2012
    Location
    Knoxville, TN
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need first approximate match returned

    Tony,

    Thank you for your help. I used your suggestion and it works for the example I provided. However, it doesn't work for the data I am working with. See attached worksheet 2, it returns the last match. Hopefully, I have some simple mistake.
    Attached Files Attached Files

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

    Re: Need first approximate match returned

    So you want to find the first time the value in A exceeds the lookup value, and return from column B the row before?

    Try

    =INDEX(B1:B1000,MATCH(TRUE,INDEX(A1:A1000>3.07,0,0),0)-1)

    This returns the value from B46 in your example book.

  7. #7
    Registered User
    Join Date
    07-05-2012
    Location
    Knoxville, TN
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need first approximate match returned

    Jonmo1,

    That works and I appreciate your help.

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

    Re: Need first approximate match returned

    You're welcome.

+ 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. match approximate 2 column
    By alaaabouelazm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-24-2015, 12:08 PM
  2. [SOLVED] index match - 2 criteria, one approximate
    By abhishek007 in forum Excel General
    Replies: 11
    Last Post: 04-11-2015, 05:46 PM
  3. Index(Match) with 2 criteria, one of which is approximate
    By mikeronni in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2014, 01:38 PM
  4. Using approximate lookup and getting duplicate returned values
    By nikkigotro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2013, 02:54 PM
  5. [SOLVED] Locate approximate match
    By escapes88 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-18-2013, 10:18 AM
  6. [SOLVED] Excel 2007 : Issue with vlookup and approximate match
    By Sylwia in forum Excel General
    Replies: 4
    Last Post: 06-15-2012, 12:25 PM
  7. Find Approximate Match
    By nvallev in forum Excel General
    Replies: 4
    Last Post: 07-06-2011, 07:31 AM

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