BBampaa

Lessons › Excel & Google Sheets

Excel & Google Sheets lesson

VLOOKUP

It finds Earbuds in the first column of F2:G5 and brings back column 2, the price. FALSE means an exact match.

Try this lesson free →
About 5–10 minutes · no sign-up needed

Example

It does the same job as XLOOKUP. You give it the whole table and say which column to bring back:

=VLOOKUP(B2,F2:G5,2,FALSE)

Typed into cell D2 of this sheet:

OrderProductQtyPriceProductPriceLook upPrice
O101Earbuds2Earbuds35Charger
O102Charger1Charger15
O103Phone case3Phone case8
O104Screen guard4Screen guard5
O105Earbuds1

Key points

B2What to look for: this order's product.
F2:G5The whole table. VLOOKUP always searches its first column.
2Which column to bring back: the price is column 2 of F2:G5.
FALSEExact match only. Leave it out and VLOOKUP can bring back the wrong row.

Put together: =VLOOKUP(B2,F2:G5,2,FALSE). It gives the same answer as =XLOOKUP(B2,F2:F5,G2:G5). In new files, XLOOKUP is easier.

Practice

Try each one in your head first, then open the answer.

1. In D3, look up the price for order O102 with VLOOKUP.
=VLOOKUP(B3,F2:G5,2,FALSE)
2. In D4, look up the price for order O103 with VLOOKUP.
=VLOOKUP(B4,F2:G5,2,FALSE)
3. In D5, look up the price for order O104 with VLOOKUP.
=VLOOKUP(B5,F2:G5,2,FALSE)
4. In D2, look up the price for order O101 with VLOOKUP.
=VLOOKUP(B2,F2:G5,2,FALSE)
5. In I2, use VLOOKUP to look up the price of whatever product is typed in H2.
=VLOOKUP(H2,F2:G5,2,FALSE)

Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.

Try this lesson free →
About 5–10 minutes · no sign-up needed