Excel VLOOKUP

VLOOKUP finds a value in the first column of a table and returns the item from a column you choose by number.

An HR assistant receives a list of employee IDs and must add names and salaries from the master file. VLOOKUP is still everywhere in company workbooks, so even if you prefer newer functions you will need to read, repair and write it.

Practice it now

How to write it

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
lookup_value
What to find. It must be in the table's first column.
table_array
The whole table.
col_index_num
Which column to return, counting from 1.
range_lookup
Use FALSE for an exact match.

Watch it work

F2fx 
ABCDEFG
1Employee IDNameDeptSalary
21001GraceFinance62000
31002HugoIT71000
41003InesSales54000
51004JonasIT68000
61005KiraHR59000
7
1

Column 2 of the table is Name.

Examples

Who is employee 1003?

=VLOOKUP(1003,A2:D6,2,FALSE)Ines

Column 2 of the table is Name.

What is employee 1004 paid?

=VLOOKUP(1004,A2:D6,4,FALSE)68,000

Column 4 of the table is Salary.

Which department is 1002 in?

=VLOOKUP(1002,A2:D6,3,FALSE)IT

Same search, different column number.

Your turn

Return the Salary of employee 1005. Type your formula in F2.

ABCDEF
1Employee IDNameDeptSalary
21001GraceFinance62000
31002HugoIT71000
41003InesSales54000
51004JonasIT68000
61005KiraHR59000
7

Common mistakes

Leaving out FALSE.

VLOOKUP then assumes a sorted list and can return a wrong answer with no error.

Inserting a column inside the table.

The fixed column number now points at the wrong data.

Searching a column that is not the first.

Rearrange the table, or switch to XLOOKUP or INDEX and MATCH.

Good to know

  • Lock the table with $A$2:$D$6 before copying the formula down.
  • Approximate match is useful for grade or tax bands, provided the first column is sorted ascending.
  • VLOOKUP or XLOOKUP? XLOOKUP is safer where it is available. VLOOKUP remains the choice for files shared with older versions of Excel.