Note: The other languages of the website are Google-translated. Back to English

Lookup closest match

To look for the closest match of a lookup value in a numeric dataset in Excel, you can use the INDEX, MATCH, ABS and MIN functions together.

lookup closest match 1

How to find the closest match in Excel?

To know which salesman made the closest sales to the target of $20,000 as shown above, a formula combines the INDEX, MATCH, ABS and MIN functions will help you in this way: The ABS function will turn all the difference values between the sales made by each salesman and the sales target positive, then MIN will find the smallest difference, which means the closet match. Now we can use the MATCH function to locate the position of the closet match and have INDEX to retrieve the value at the corresponding position.

Generic syntax


√ Note: This is an array formula that requires you to enter with Ctrl + Shift + Enter.

  • return_range: The range where you want the combination formula to return the salesman from. Here refers to the name range.
  • lookup_array: The range of cells with the values to compare with the lookup_value. Here refers to the sales range.
  • lookup_value: The value to compare with to find its closest match. Here refers to the sales target.

To know which salesman made the closest sales to the target of $20,000, please copy or enter the formula below in the cell F5, and press Ctrl + Shift + Enter to get the result:


Or, use a cell reference to make the formula dynamic:


lookup closest match 2

Explanation of the formula


  • ABS(C5:C10-F4): The part C5:C10-F4 will get all the difference values between each sales in the range C5:C10 and the target sales $20,000 in cell F4 in an array like this: {-4322;2451;6931;-1113;6591;-4782}. The ABS function will turn all the negative numbers positive like this: {4322;2451;6931;1113;6591;4782}.
  • MIN(ABS(C5:C10-F4)) = MIN({4322;2451;6931;1113;6591;4782}): The MIN function will find the smallest number from the array {4322;2451;6931;1113;6591;4782}, which means the smallest difference, or we say the closet match. So the function will return 1113.
  • MATCH(MIN(ABS(C5:C10-F4)),ABS(C5:C10-F4),0) = MATCH(1113,{4322;2451;6931;1113;6591;4782},0): The match_type 0 forces the MATCH function to find the position of the exact number 1113 in the array {4322;2451;6931;1113;6591;4782}. The function will return 4 since the number is at the 4th position.
  • INDEX(B5:B10,MATCH(MIN(ABS(C5:C10-F4)),ABS(C5:C10-F4),0)) = INDEX(B5:B10,4): The INDEX function returns the 4th value in the name range B5:B10, which is Bale.

Related functions

Excel INDEX function

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

Excel MATCH function

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

Excel ABS function

The ABS function returns the absolute value of a number. Negative numbers will be converted to positive with this function, but positive numbers and zero number will be unaffected.

Related Formulas

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.

Approximate match with INDEX and MATCH

There are times when we need to find approximate matches in Excel to evaluate employees' performance, grade students’ scores, calculate postage based on weight, etc. In this tutorial, we will talk about how to use the INDEX and MATCH functions to retrieve the results we need.

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.

The Best Office Productivity Tools

Kutools for Excel - Helps 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 80% time for you.

  • 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.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL