Skip to main content

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.


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...

The Best Office Productivity Tools

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (1)
Rated 0.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Keep yrs at "15" and switch major to "science"...formula busts. This is not a robust formula...
Rated 0.5 out of 5
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations