Cellgrids Cellgrids
Home › Practice questions › IFERROR › Question 2

Excel IFERROR Practice Question: Look up the price of each item in the table (D2:E4). Show Not found if the…

By Rinkesh Shah, founder of Cellgrids.

The question

Look up the price of each item in the table (D2:E4). Show Not found if the item is not in the table. Put it in B2 to B4.

The data

ABCDE
1ItemPriceItemPrice
2Pen?Pen5
3Cap?Book40
4Bag?Bag250

The yellow cells are where your answer goes.

Show answer

Expected results:

  • B2 = 5
  • B3 = Not found
  • B4 = 250

How it works

Explanation: VLOOKUP gives #N/A when the item is missing. IFERROR replaces that error with a friendly message.
Syntax: =IFERROR(VLOOKUP(A2,$D$2:$E$4,2,FALSE),"Not found")
Pen is 5. Cap is not in the table, so Not found. Bag is 250.

Try it yourself in the live sheet

Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.

Try this question in the live sheet →

IFERROR syntax

=IFERROR(value, value_if_error)

Runs a formula, but shows a fallback value instead of an error if it fails. IFERROR is used to build decision rules directly into a spreadsheet instead of manually judging each row. Full IFERROR guide.

More IFERROR practice questions

All practice questions · Excel exercises · Interview prep · Cheat sheet