Excel glossary

How to use VLOOKUP in Excel

VLOOKUP stands for ‘Vertical Lookup’. It is a function that makes Excel search for a certain value in a column (the so called ‘table array’), in order to return a value from a different column in the same row.

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:

Initiate the VLOOKUP function in Excel // PerfectXL

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

Call the VLOOKUP function in Excel // PerfectXL

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

Lookup value in a VLOOKUP function in Excel // PerfectXL

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):

Lookup range (or table array) of a VLOOKUP function in Excel // PerfectXL

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’:

Exact match in a VLOOKUP function in Excel // PerfectXL

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

Result of an exact match in a VLOOKUP function in Excel // PerfectXL

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:

Standard Excel error in a VLOOKUP function // PerfectXL

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’:

Approximate Match in a VLOOKUP function // PerfectXL

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