Cellgrids Cellgrids
Home › Practice questions › IFERROR › Question 3

Excel IFERROR Practice Question: The values are typed as text. Turn each into a number, and show 0 if it is not…

By Rinkesh Shah, founder of Cellgrids.

The question

The values are typed as text. Turn each into a number, and show 0 if it is not a number. Put it in B2 to B4.

The data

AB
1TextNumber
2100?
3abc?
445?

The yellow cells are where your answer goes.

Show answer

Expected results:

  • B2 = 100
  • B3 = 0
  • B4 = 45

How it works

Explanation: VALUE gives #VALUE! for text that is not a number. IFERROR turns that error into 0.
Syntax: =IFERROR(VALUE(A2),0)
100 becomes 100. abc is an error, so 0. 45 becomes 45.

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