Tip: Other languages are Google-Translated. You can visit the English version of this link.

Lookup closest match value with multiple criteria

In some cases, you may need to lookup the closest or approximate match value based on more than one criteria. With the combination of INDEX, MATCH and IF functions, you can quickly get it done in Excel.


How to lookup closest match value with more than one criteria?

As the below screenshot shown, you need to find the right person for the job based on two criteria “the major is Computer” and “the work experience is 15 years”.

Note: For this to work correctly, if there containing duplicate majors, the work experiences of these duplicate majors should be sorted in ascending order.

1. Select a blank cell to output the result, then copy below formula into it and press the Ctrl + Shift + Enter keys to get the result.

=INDEX(D3:D8,MATCH(G5,IF(B3:B8=G4,C3:C8),1))

Notes: in this formula:

  • D3:D8 is the column range contains the result you are searching for;
  • G5 contains the second criteria (experience number 15) you will lookup value based on;
  • G4 contains the first criteria (Computer) you will lookup value based on;
  • B3:B8 is the range of cells matching to the first criteria;
  • C3:C8 is the range of cells matching to the second criteria;
  • Number 1 is approximate lookup, which means that if the exact value can’t be found, it will find the largest value that is less than the lookup value;
  • This formula must be entered as an array formula with the Ctrl + Shift + Enter keys.

How this formula works

This formula can be broken down into several components:

  • IF(B3:B8=G4,C3:C8): the IF function here returns the result as {9;13;FALSE;FALSE;FALSE;FALSE}, which is coming from testing the values in B3:B8 to see if they match the value in G4. If there is a match, then returns the corresponding value, otherwise, returns FALSE. Here finds two matches and four mismatches.
  • An array formula =MATCH(G5,{9;13;FALSE;FALSE;FALSE;FALSE},1): the MATCH function finds the position of number 15 (the value in G5) in range C3:C8. As the number 15 can’t be found, it match to the next smallest value 13. So the result here is 2.
  • And =INDEX(D3:D8,2): The INDEX function returns the value of the second cell in range D3:D8. So the final result is Amy.

Related functions

Excel IF function
The IF function is one of simplest and most useful functions in Excel workbook. It performs a simple logical test which depending on the comparison result, and it returns one value if a result is TRUE, or another value if result is FALSE.

Excel MATCH function
The Microsoft Excel MATCH function searches for a specific value in a range of cells, and returns the relative position of this value.

Excel INDEX function
The INDEX function returns the displayed value based on a given position from a range or an array.


Related articles

Average cells based on multiple criteria
In Excel, most of us may be familiar with COUNTIF and SUMIF functions, they can help us to count or sum values based on criteria. But have you ever tried to calculate the average of values based on one or more criteria in Excel? This tutorial provides examples and formulas in details to help easily get it done.
Click to know more...

Count cells if one of multiple criteria met
This tutorial shares the ways to count cells if contain X or Y or Z … etc. in Excel.
Click to know more...

Count unique values based on multiple criteria
This article takes some examples to count unique values based on one or more criteria in a worksheet with detailed methods step by step.
Click to know more...


Excel Productivity Tools

300 Advanced Features Help You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 70% time.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.

Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Office Tab Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.