Lookup error handling

Beginner

Missing items are normal. The key is returning a clean message instead of #N/A.

You can wrap VLOOKUP with IFNA, or you can use XLOOKUP's built-in if_not_found argument.

Your task

You have a small inventory list in A2:C4 and a lookup SKU in B6.

  1. In cell B7, write a VLOOKUP that returns the product name. Wrap it with IFNA so missing items return Not found.
  2. In cell B8, write an XLOOKUP that returns the same result using its if_not_found argument.

Tip: Use exact match for VLOOKUP (the 4th argument set to FALSE).

Need some help?

Hint 1

VLOOKUP needs IFNA outside the function to replace #N/A.

Hint 2

XLOOKUP can return Not found as its 4th argument.

Hint 3

Lock the table ranges so you can edit inputs without breaking the formula.

Related function(s)

Exercise