Excel Supreme

Excel track · Exercise 61 of 86 Paid

Formula audit: fix five broken sheets

Repair five broken cells, one per error code, by choosing the test each code implies.

Advanced

Five broken sheets, one per error code, to repair in place

Read-only data · screen 1 of 5 · answer in D3

In D3, repair the ratio for the rep with no visits so it reads n/a instead of an error.

ABCD
1RepVisitsOrdersRatio
2Ana104
3Bo00
4Cy86
5Di50

Download this grid (.xlsx) Two tabs: the grid you see, and the answer.

D3

What it does

Each error code names one kind of break. A division error means the denominator can be zero, so the repair is a test in front of the division. A not-available error means a lookup found no row, so the repair tests for the key before asking for it.

A value error means an operand is text where a number belongs, which ISNUMBER catches. A reference error means a range points outside the table, and a name error means the function was typed wrong. Both are read off the sheet, and neither needs a guess about the arithmetic.

The five screens take one code each, and each repair uses a different function: IF, COUNTIF, ISNUMBER, SUMIF and AVERAGE. Working from the code down stops you rewriting a formula that was one argument short of right.

Syntax

each error code names one break: a zero divisor, a missing key, text in arithmetic, a wrong range, a misspelling

Worked example

On Five broken sheets, one per error code, to repair in place, =IF(B3=0,"n/a",C3/B3) returns n/a.

=IF(B3=0,"n/a",C3/B3)

Common errors

Error codes for an error-code-first repair: guard, key test, type test, range, spelling
ErrorWhat it means and how to fix it
#DIV/0!A denominator is zero, so the division has no result and the cell needs a test in front of it.
#N/AA lookup key is not in the table, which leaves no row to read, so the key has to be counted first.
#VALUE!An operand is text where a number belongs, so the arithmetic needs a type test before it runs.

At work

Opening a workbook someone else built and repairing each cell from the error code it shows.