Cellgrids Cellgrids
Home › Practice questions › IFERROR › Question 6

Excel IFERROR Practice Question: Look in list 1 (C2:D3) first, then in list 2 (E2:F3), and show Not found if…

By Rinkesh Shah, founder of Cellgrids.

The question

Look in list 1 (C2:D3) first, then in list 2 (E2:F3), and show Not found if the code is in neither. Put the price in B2 to B4.

The data

ABCDEF
1CodePriceList 1PriceList 2Price
2A1?A110B130
3B1?A220B240
4C9?

The yellow cells are where your answer goes.

Show answer

Expected results:

  • B2 = 10
  • B3 = 30
  • B4 = Not found

How it works

Explanation: If the first VLOOKUP fails, IFERROR tries the second one. If that also fails, the text Not found is shown.
Syntax: =IFERROR(VLOOKUP(A2,$C$2:$D$3,2,FALSE),IFERROR(VLOOKUP(A2,$E$2:$F$3,2,FALSE),"Not found"))
A1 is in list 1: 10. B1 is not in list 1 but is in list 2: 30. C9 is in neither list: Not found.

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