Contact

Gnumeric #DIV/0!: Find the Zero Divisor Before Hiding the Error

Scope: Gnumeric desktop, English 1.12-series manual checked October 21, 2026. Distribution builds and translations may differ. These new exercises have not been executed in Gnumeric; results below are documentation-supported expectations and independently checked arithmetic or logic, not native test observations. Work in a disposable workbook, not your original.

Start with the denominator, not the final total

Gnumeric identifies #DIV/0! as division by zero in its error-elements reference. For a ratio, write down the numerator’s meaning, the denominator’s meaning and their units. A cost per item needs an item count; a percentage change needs a meaningful comparison base.

Select the failing cell and inspect its actual formula. If the divisor is a calculated cell, inspect that cell’s inputs too. Do not change a downstream total before locating the earliest zero divisor. A number that merely looks like zero after rounding is a different case: examine the underlying input rather than assuming the display establishes exact zero.

Reproduce a zero baseline safely

In a new sheet enter the following numeric inputs and formulas:

Cell Entry Meaning
A2 120 Current-period units
B2 0 Previous-period units
C2 =(A2-B2)/B2 Relative change
D2 =A2-B2 Absolute change

C2 is expected to show #DIV/0!; D2 is 120. The absolute increase is meaningful even though a percentage increase from a zero base is undefined. Replacing the percentage error with 0 would falsely say there was no relative change.

For this synthetic test only, change B2 to 80. C2 should become 0.5, equivalent to 50%, and D2 40. Change A2 to 160: C2 should become 1, or 100%, and D2 80. These checks test both inputs. Restore A2 to 120 and B2 to 0 to confirm the exceptional case remains visible.

Repair the meaning of the input

  • If B2 is wrong, correct it from the actual record, not from a guessed replacement that makes division possible.
  • If zero is accurate, decide how the report should describe an undefined percentage. Keep the absolute change alongside it.
  • If B2 is missing, record that separately. Do not silently treat “not collected” as a measured zero.
  • If a copied formula points at the wrong baseline, repair the reference pattern and check several rows.

For the known numeric fixture, =IF(B2=0,"No percentage baseline",(A2-B2)/B2) expresses a specific reporting decision. Gnumeric’s IF documentation describes choosing the corresponding branch. This guard is not a complete missing-data or text-validation policy.

Verify before accepting the repair

Check a positive baseline, a real zero baseline and a missing-input scenario separately in your real model. Keep the raw ratio visible during review. Do not blanket-wrap calculations with IFERROR: catching every error could conceal a broken reference as well as zero division.

If the formula returns an old number instead of updating, use the separate stale-result diagnostic. For copied formulas, see relative and absolute references. Return to the error selector for a different label.