How to Use VLOOKUP for Approximate or Exact Matches in Excel

This post will guide you how to use VLOOKUP function to look up values based on an exact or approximate match in Excel 2013/2016 or the higher versions. VLOOKUP function can search a range of cells for a specific value or data and if a match is found, and it will return a piece of data from that matching.

In most of cases, you can be use VLOOKUP function to find exact matches from a given range of cells based on some kind of value in your worksheet. Also you can also use VLOOKUP function to find non-exact or approximate matches to achieve your request.

If you still do not know what is exact or approximate matches in VLOOKUP function in Microsoft Excel, and it is recommend to have a quick look of my earlier post on how to use Excel Vlookup function.

Assuming that you have a sales data in cell Range A1:C6, and you want to find a sales number based on a product id, and you can use the following vlookup formula into a blank cell where you can to show the result.

Use of VLOOKUP function to Extract Approximate Matches

If you want to calculate the discount based on the quantity sold in your worksheet, and assuming that you want to search a sales number 60 to calculate its discount value, which doesn’t exist in your data A1:D6. And to search for an approximate  matches based on your specified sales number 60, just type the following VLOOKUP formula into cell G2.


use vlookup for approximate or exact match3

Note: the Cell F2 is the searched value which you want to get it the appropriate discount number. C1:D6 is the data range that you are using. The number 2 is that your matched value is returned. The TRUE value indicates that you want to calculate the approximate match.

Before applying the above formula, you need to make sure that your sales column is sorted in ascending order. Or the VLOOKUP formulas stop working properly and you will get a N/A errors.

Use of VLOOKUP function to get Exact Matches

Now let’s add this VLOOKUP formula in cell G2 to calculate the appropriate sales number based on the product id in cell F2.


use vlookup for approximate or exact match1

If you wish to search for multiple values in the same column, and you just need to drag the fill handle (G2) down to other cells to apply this formula.

use vlookup for approximate or exact match2

Note: you need to set a value for range_lookup argument, and it is set to FALSE or 0, VLOOKUP will find a exact match. And if it is set to 1 or TRUE, VLOOKUP will search for the closest match.

Related Functions

  • Excel VLOOKUP function
    The Excel VLOOKUP function lookup a value in the first column of the table and return the value in the same row based on index_num position.The syntax of the VLOOKUP function is as below:= VLOOKUP (lookup_value, table_array, column_index_num,[range_lookup])….






Related Posts

Build Hyperlink With VLOOKUP in Excel

You might have come across a task in which you were assigned to build hyperlinks, which seems very easy, and if you are new to excel or don't have enough experience with it, then you might wonder about doing this ...

Calculate Total Cost with Excel VLOOKUP Function

In today's article we will show you how to calculate the total cost for a given weight using the Excel VLOOKUP function. This function will help us to find the appropriate unit price for that weight and then we can ...

Basic Price Discount Calculation with Excel VLOOKUP Function

We often encounter product discounts in our shopping. Depending on the level of spending, the mall will offer different percentages of discounts. Usually, the more you spend, the bigger the discount, while the less you spend, the smaller the discount. ...

Calculate Grades With VLookup in Excel

Why Should You Calculate Grades With VLookup Excel? If you're looking for a simple way to find out a student's grades, VLOOKUP Excel can do the trick. This function uses a lookup table to find the values and sort them ...

Convert State Names To Abbreviations

Assume that you got a task to convert the full state's name into the abbreviations in MS Excel, and for doing this task, you might choose to do it manually, which is an acceptable way only if you don't have ...