Lookup error handling
BeginnerMissing 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.
- In cell B7, write a VLOOKUP that returns the product name. Wrap it with IFNA so missing items return Not found.
- In cell B8, write an XLOOKUP that returns the same result using its
if_not_foundargument.
Tip: Use exact match for VLOOKUP (the 4th argument set to FALSE).
Need some help?
Answer
Exercise
Lookup error handling
BeginnerMissing 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.
- In cell B7, write a VLOOKUP that returns the product name. Wrap it with IFNA so missing items return Not found.
- In cell B8, write an XLOOKUP that returns the same result using its
if_not_foundargument.
Tip: Use exact match for VLOOKUP (the 4th argument set to FALSE).