FxFormula Drills

Premium exercise · Excel logic, arrays, and finance

IFERROR practice: a safe ratio

Practice Excel IFERROR by dividing actual by prior and returning n/a when the prior amount is zero.

Column A is this year's amount and column B is last year's. The ratio is this year divided by last year.

In column C, use IFERROR so a zero prior amount returns the text n/a instead of #DIV/0!.

Dataset

Starter sheet. Cells marked formula are where the formula goes.

Starter sheet for this exercise
RowABC
1This yearLast yearRatio
2105Formula goes in C2. formula
393Formula goes in C3. formula
480Formula goes in C4. formula

Hint

IFERROR takes the formula to try, then the value to show if that formula errors.

Explanation

This exercise practices IFERROR in Excel. The formula goes in C2, C3, C4.

IFERROR returns the division when it works and n/a when it would have shown #DIV/0!. 10 / 5 is 2, 9 / 3 is 3, and 8 / 0 becomes n/a. Other errors, not only divide-by-zero, take the same fallback.

The interactive sheet and a worked solution are part of Formula Drills Premium. The instructions and starter data on this page are the full problem.

Solve this exercise

Practice this formula

Loading the practice grid…