+ Reply to Thread
Results 1 to 9 of 9

Index Match Multiple Criteria with Tolerance

  1. #1
    Registered User
    Join Date
    01-18-2019
    Location
    Manila, Philippines
    MS-Off Ver
    2013
    Posts
    3

    Index Match Multiple Criteria with Tolerance

    Hi, I'm having trouble this one out.

    Normally I would just use {=INDEX(A:A,MATCH(J4&K4,D:D&E:E,0))} to return the value I'm looking for to cells at column N.
    However, values from J and K aren't exactly equal to values from columns D and E. They have about a less than 1% difference.
    Any way to still make excel return a value if the criteria checks are within a given tolerance? Say 1% in this case. If it can't find a value within 1%, it just returns a #N/A or some error.

    I've been fiddling with regular excel functions, but i figured maybe there's an answer using VBA.

    First time asking here so please forgive me

    Capture.JPG
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Index Match Multiple Criteria with Tolerance

    Before committing to a VBA approach you might try the following formula (not an Array) ?

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    you may need to decide if you want to give priority to closest match as opposed to the above which will (I think) return first label found where D & E are both within the 1% of J & K respectively.

  3. #3
    Registered User
    Join Date
    01-18-2019
    Location
    Manila, Philippines
    MS-Off Ver
    2013
    Posts
    3

    Re: Index Match Multiple Criteria with Tolerance

    The formula works! Thank you so much XLent! Spent the whole afternoon trying to figure this thing out. Thanks thanks thanks!
    I'll go ahead and study the formula so I know how it works. Thank you!

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Index Match Multiple Criteria with Tolerance

    Glad it helped.

    In essence the calculation works by:

    1. dividing the row number by 2 booleans, the first Boolean being whether or not "X" is within threshold, the second Boolean being whether or not "Y" is within threshold
    at this point, given the Boolean coercion (via Division) your resulting array of values can only be either a) row # (both thresholds met) or b) #DIV/0! (one or more thresholds not met)

    2. using the AGGREGATE function we tell it to apply SMALL (15) function against values generated by above, to ignore Errors (6), and to return the smallest value (final parameter [1] being k)

    we then apply the result of step 2 to the INDEX against Column B to return the associated label.

    the IFERROR will return #N/A (as requested) if there are no valid results found.

    Hope that helps clear things up a little.

  5. #5
    Registered User
    Join Date
    01-18-2019
    Location
    Manila, Philippines
    MS-Off Ver
    2013
    Posts
    3

    Re: Index Match Multiple Criteria with Tolerance

    Never would have thought of that ) thanks!

  6. #6
    Registered User
    Join Date
    11-25-2021
    Location
    Texas, USA
    MS-Off Ver
    365
    Posts
    5

    Re: Index Match Multiple Criteria with Tolerance

    Hello, I am using your formula with slight mods:

    It looks up a value in a list within a tolerance:

    =IFERROR(INDEX(listC1,AGGREGATE(15,6,ROW(listC1)/(ABS(ROUND(1-listC1/C27,2))<=Tolerance),1)),NA())

    C27 is the value to lookup, and there is an exact match in List1C.

    It works great, unless I put a decimal number less than 1 in the tolerance, like .01.

    Any help is appreciated.

  7. #7
    Registered User
    Join Date
    11-25-2021
    Location
    Texas, USA
    MS-Off Ver
    365
    Posts
    5

    Re: Index Match Multiple Criteria with Tolerance

    Zero also fail;s

  8. #8
    Registered User
    Join Date
    11-25-2021
    Location
    Texas, USA
    MS-Off Ver
    365
    Posts
    5

    Re: Index Match Multiple Criteria with Tolerance

    I see now that the tolerance is a percent.

  9. #9
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Index Match Multiple Criteria with Tolerance

    Comment deleted. Discussion continued in the following thread.

    https://www.excelforum.com/excel-for...ml#post5599277
    Last edited by GeoffW283; 11-25-2021 at 08:41 PM.

+ 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. [SOLVED] Index Match with multiple criteria and date criteria
    By snolem75 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2018, 03:51 PM
  2. Replies: 16
    Last Post: 01-05-2018, 11:04 PM
  3. Need help in Index, Match usage to match multiple criteria in sum function
    By Summer0830 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2017, 02:47 AM
  4. Index/Match to Match entries on multiple criteria
    By manning457 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2015, 02:32 PM
  5. [SOLVED] Index Match with Multiple Criteria Using Same Criteria Column
    By rominjn in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-05-2015, 11:34 AM
  6. Replies: 2
    Last Post: 09-27-2014, 04:34 PM
  7. [SOLVED] Index Match using multiple criteria to match to
    By sacastiglia in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-25-2014, 03:46 PM

Tags for this Thread

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