VLOOKUP Function in Excel

VLOOKUP function example in Excel
VLOOKUP function example in Excel

VLOOKUP in Excel

Vlookup (“V” stands for Vertical) is a build in function in Excel. It is used to lookup(find) a particular value in a table array and returns the specific column in a table. The lookup value must be in the first column of the table.

Syntax of Vlookup function

Arguments description

  • lookup_value – The value to find for in the first column of the table
  • table_array – The range where the lookup value and its corresponding values are located
  • column_index_num – The column number in the range that contains the returns value.
  • range_lookup – This is the optional argument. Mention TRUE if you want an approximate match or FALSE if you want an exact match of the return value.If this parameter is omitted, TRUE is the default value.

Example 1: Use FALSE for Exact match

Lets lookup the Employee Name,Designation and Salary based on the Employee id in the below Excel

Input data for Vlookup function in Excel
Input data for Vlookup function in Excel

We have a sample of Employee details.Lets search the Employee id #48322 in the table using Vlookup function and get the Employee Name based on column index 2 in the table array.

Output of Vlookup function
Output of Vlookup function

Lets apply the other Voolkup formula to get the Designation and Salary from the Employee table array.

Vlookup return value based on column index
Vlookup return value based on column index

If the lookup value is not present in the given table array, the Vlookup function will return the #N/A in the cell.

Example 2: Use TRUE for Approximate match

In some cases, we don’t want to search the exact value in the table.We can use TRUE as fourth argument in the Vlookup function to achieve those scenarios. Lets discuss this with some examples.

Find student Grade using Vlookup function
Find student Grade using Vlookup function

We can lookup the student marks in the grade table to get the minimum grade using the Vlookup function as below.

Approximate match in Vlookup function in Excel
Approximate match in Vlookup function in Excel

The marks such as 400,350 & 300 are approximately match with mark 300 in the Grade table. Since we have mentioned range lookup as TRUE in the Vlookup function, It returned Grade C as Minimum Grade for those marks in the Student marks table.

Similarly other mark 290 approximately matched with mark 260 in the Grade table. So Grade C is returned for the student Grace in the Student marks table.