StatementNest

EXAMPLE + HANDS-ON PRACTICE

VLOOKUP practice with expense data

VLOOKUP answers a question such as “How much did we pay Harbor Desk?” It finds a value in the first column of a table and returns a value from another column in the same row.

A small worked example

Column A holds the merchant, column B the category and column C the amount:

Fictional expenses
RowA: MerchantB: CategoryC: Amount
2Mint PostShipping15
3Harbor DeskOffice220
4Blue LanternSoftware89
=VLOOKUP("Harbor Desk",A2:C4,3,FALSE)

The result is 220. VLOOKUP looks for Harbor Desk in column A, moves to the 3rd column of the table (C) in the same row, and returns its value.

The four arguments

  1. Lookup value: what to find, typed in quotes or as a cell such as E2.
  2. Table: the range to search. The lookup value must be in its first column.
  3. Column number: which column of the table to return, counting from 1.
  4. FALSE: exact match. Leave it out and Excel guesses on a sorted list, which causes wrong answers.

Why you get #N/A

XLOOKUP: the simpler version

In Excel 365 and 2021 or newer, XLOOKUP needs no column number and can look left:

=XLOOKUP("Harbor Desk",A2:A4,C2:C4)

Try it yourself

In the simulator, use VLOOKUP to find a merchant’s amount in an eight-row ledger, then look up a status from a cell, then use XLOOKUP. Your formula is checked instantly, and changed numbers make sure it really works.

Examples use English function names and comma separators. Your Excel language settings may use different names or separators.

Start the free lessonsOpen the VLOOKUP exercise

Product reference: Microsoft documentation. Teaching examples and fictional data by StatementNest.