What is the correct formula for VLOOKUP in Excel?

About the VLOOKUP function

A VLOOKUP function exists of 4 components:

  1. The value you want to look up;
  2. The range in which you want to find the value and the return value;
  3. The number of the column within your defined range, that contains the return value;
  4. 0 or FALSE for an exact match with the value your are looking for; 1 or TRUE for an approximate match.

Syntax: VLOOKUP([value], [range], [column number], [false or true])

VLOOKUP example

In our example we have a list of fruits, the amount in stock and the current price. We want to find the price of kiwi’s quickly in this table.

First, select a cell in which you want to publish the current price:

What is the correct formula for VLOOKUP in Excel?

So, in our selected cell we start typing: =VLOOKUP( :

What is the correct formula for VLOOKUP in Excel?

Then we select the value we want to look up, in this case it’s ‘Kiwi’ in cell B12:

What is the correct formula for VLOOKUP in Excel?

Next we enter ‘;’ and select the range (or table array) in which we want to find the lookup value and the return value. In this case it is range (A2:C10):

What is the correct formula for VLOOKUP in Excel?

Then we enter ‘;’ and the number of the column within the defined range in which we want to look for the return value. In this case it is column 3, followed by ‘;’ and ‘0’ or ‘FALSE for an exact match with the lookup value ‘Kiwi’:

What is the correct formula for VLOOKUP in Excel?

When we press enter, we get the corresponding price from the row that contains value ‘Kiwi’ within the selected table array:

What is the correct formula for VLOOKUP in Excel?

In this example we only have a small list of fruits, but imagine you have a long list of data and you wish to use a certain value elsewhere in your spreadsheet. Using VLOOKUP (and HLOOKUP) the user only has to change a certain value in one worksheet and it will automatically be changed in all other relevant places.

But what if we’re not certain about the lookup value? This is when the approximate match might be useful.

Risks

VLOOKUP is considered a vulnerable function, since the function isn’t automatically updated when, for example, a column is added. That’s why we recommend the combination of INDEX and MATCH to get to the same results.

Approximate match in VLOOKUP

When we enter the word ‘Kwii’ in our lookup value cell B12, the VLOOKUP function as we designed it gets confused, because it can’t find this value in the table array. It returns the standard Excel error #N/A:

What is the correct formula for VLOOKUP in Excel?

But when we change the ‘0’ (or ‘False’) component of our VLOOKUP function to ‘1’ or ‘TRUE’:

=VLOOKUP(B12; A2:C10; 3; 1)

Now we have asked the function to look for an approximate match with ‘Kwii’. If it can’t find the exact match, it will look for the closest match to the value ‘Kwii’, less than ‘Kwii’, which is ‘Kiwi’:

What is the correct formula for VLOOKUP in Excel?

Would we enter ‘Kawi’, it will return €0,23, because then ‘Banana’ is the closest match less than ‘Kawi’ (based on the alphabet).

Blog posts for better Excel use:

What is the correct formula for VLOOKUP in Excel?

The MOST FRUSTRATING feature in Microsoft Excel

The flexibility Excel offers an end user almost guarantees that its approval ratings clearly outpace any ERP. People love how easy it is to get started in Excel, how flexible it is, and how widely known the tool is. While this is all true, the tool can also be frustrating sometimes.

What is the correct formula for VLOOKUP in Excel?

How to tell what changes were made to your Excel model

What do you do when Excel asks you to ‘save your changes’ when you didn’t consciously change anything? Or what if you receive a newer version of a file from a client or coworker, without any explanation of the changes that were made? We’ll help you discover the exact differences between two workbooks, so you can review the changes manually.

What is the correct formula for VLOOKUP in Excel?

Automated visual cell type distinction

PerfectXL Highlighter visually distinguishes different cell types, such as cells with hard coded values, cells with formulas and cells with references. Turn different types of ‘highlights’ on and off to visualize the context of your worksheet and to spot irregularities, like broken formula ranges, at a glance.

How use VLOOKUP formula with example?

How to use the VLOOKUP function..
Select a cell ( H4 ).
Type =VLOOKUP..
Double click the VLOOKUP command..
Select the cell where search value will be entered ( H3 ).
Type ( , ).
Mark table range ( A2:E21 ).
Type ( , ).
Type the number of the column, counted from the left ( 2 ).

What is VLOOKUP step by step?

How to use VLOOKUP in Excel.
Step 1: Organize the data. ... .
Step 2: Tell the function what to lookup. ... .
Step 3: Tell the function where to look. ... .
Step 4: Tell Excel what column to output the data from. ... .
Step 5: Exact or approximate match..