Find a value with VLOOKUP

Lookups · About 5 minutes

Find a value with VLOOKUP

VLOOKUP finds a value in the first column of a table, then brings back something from the same row. It is one of the most asked-about formulas in interview tests.

How VLOOKUP searchesThe formula =VLOOKUP(B8,A2:D6,4,FALSE) over a staff table in A2:D6. The value to find, E104, is in B8. VLOOKUP looks down the table's first column, A2 to A6, row by row, until it finds E104 in A6. From that row it counts across from the table's first column: 1 Emp ID, 2 Name, 3 Dept, 4 Salary. Column 4 holds 69,000, and that comes back to the formula cell, B9.=VLOOKUP(B8,A2:D6,4,FALSE)ABCD123456789Emp IDNameDeptSalary ($)E103PriyaSales58,000E101MarcusAccounts64,000E105FatimaHR52,000E102RaviIT76,000E104SarahOperations69,000Emp IDE104Salary ($)123469,000

How VLOOKUP searches

Exercise 1 of 3 · Worked example

In B9, find the salary of the employee whose ID is in B8. Type =VLOOKUP(B8,A2:D6,4,FALSE) and press Enter.

ABCD
1Emp IDNameDeptSalary ($)
2E103Priya NairSales58,000
3E101Marcus BellAccounts64,000
4E105Fatima ShaikhHR52,000
5E102Ravi KumarIT76,000
6E104Sarah KimOperations69,000
7
8Emp IDE104
9Salary ($) (answer cell)

Questions people ask

What does FALSE mean in VLOOKUP?

FALSE asks for an exact match. Without it, VLOOKUP can return a nearby row instead, which is wrong for IDs and names.

How do I VLOOKUP from another sheet?

Point the table part at the other sheet: =VLOOKUP(A2,Prices!A2:C50,3,FALSE). If the sheet name has spaces, use quotes: 'Price list'!A2:C50.

Why does my VLOOKUP return #N/A?

The value wasn't found. Common causes: FALSE is missing, extra spaces, a number stored as text, or the value isn't in the table's first column.

Does VLOOKUP work in Google Sheets?

Yes, with the same four parts in the same order.

Should I learn VLOOKUP or XLOOKUP first?

VLOOKUP first: it's still in countless work files and tests. XLOOKUP is easier once you know what a lookup does, but Excel 2019 and older don't have it.

Theme

How VLOOKUP searches

The formula =VLOOKUP(B8,A2:D6,4,FALSE) over a staff table in A2:D6. The value to find, E104, is in B8. VLOOKUP looks down the table's first column, A2 to A6, row by row, until it finds E104 in A6. From that row it counts across from the table's first column: 1 Emp ID, 2 Name, 3 Dept, 4 Salary. Column 4 holds 69,000, and that comes back to the formula cell, B9.