Cellgrids Cellgrids
Home › Practice questions › IFERROR › Question 7

Excel IFERROR Practice Question: Divide each sales figure in column A by the units in column B, treat the…

By Rinkesh Shah, founder of Cellgrids.

The question

Divide each sales figure in column A by the units in column B, treat the errors as 0, and add everything up. Put the total in D2.

The data

ABCD
1SalesUnitsTotal
21004?
3500
4903
5402

The yellow cell is where your answer goes.

Show answer

Answer in D2: 75

How it works

Explanation: IFERROR works on every row of the array at once and turns the one division by zero into 0. SUMPRODUCT then adds the results.
Syntax: =SUMPRODUCT(IFERROR(A2:A5/B2:B5,0))
The rows give 25, 0 (error), 30 and 20. The total is 75.

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