IFERROR Function (LibreOffice Calc)
Learn the IFERROR function in LibreOffice Calc: Returns value if not an error value, else alternative.
Verification status: Two identified examples were executed in LibreOffice Calc 25.2. Other examples are not necessarily application-tested. How formula examples are checked
Availability and version history
- Introduced: LibreOffice 4.0.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
The IFERROR function in LibreOffice Calc is used for this task: Returns value if not an error value, else alternative. Replace a calculation error with a readable message.
This guide explains how to read the formula, reproduce a concrete example, interpret its result and recognize common input mistakes.
Tested visual example: Handle division by zero gracefully
What this example answers: Calculate price per unit without showing #DIV/0! for zero-unit rows. The formula was entered and recalculated in LibreOffice Calc 25.2.3.2, not simulated or inferred from a reference page.
Sample sheet you can reproduce
Create a sheet named Example, put these headings on row 4, and enter the sample values in rows 5–10. Or download the editable IFERROR practice workbook with the formulas already entered.
| Sheet row | A: Item | B: Revenue | C: Units | D: Comment |
|---|---|---|---|---|
| 5 | A | 125 | 10 | Complete |
| 6 | B | 90 | 6 | Complete |
| 7 | C | 60 | 3 | Complete |
| 8 | D | 78 | 0 | No units |
| 9 | E | 105 | 7 | Complete |
| 10 | F | 120 | 8 | Complete |
Example 1 — Formula and expected result
Select cell E5, enter the formula and press Enter:
=IFERROR(B8/C8;"No units")
Verified result: No units.
IFERROR displays a fallback only when the calculation fails; it does not change the source data.

Genuine screenshot from LibreOffice Calc 25.2.3.2: the formula bar, input table and computed output are visible. No interface imagery was generated.
Example 2 — Change the inputs
The same downloadable .ods file has this second formula in E12:
=IFERROR(B5/C5;"No units")
Verified result: 12.50. Use a nonzero units row. Since division is valid, IFERROR returns the numeric price-per-unit rather than the fallback text.
How to avoid misleading results
- Watch for this mistake: Do not use IFERROR to conceal unexpected data-quality errors; investigate and correct the source problem.
- Scope and limitations: A visible, specific fallback such as “No units” is more informative than a silent blank.
- Argument separators: These examples use semicolons (
;) in the LibreOffice Calc locale tested. Other locales may use different settings. - Verification scope: The two formulas in this section were executed and checked in LibreOffice Calc 25.2.3.2. Older examples elsewhere in this article have not all been independently retested.
Official function reference: LibreOffice Help — IFERROR.
Syntax and arguments
IFERROR(value; alternative_value)
| Argument | Required? | Meaning |
|---|---|---|
Value |
Yes | The value to be calculated. |
Alternative value |
Yes | The alternative to be returned, should value be an error value. |
Calc formulas normally use semicolons (;) between arguments in common configurations; the displayed separator may depend on settings or locale.
Worked example
=IFERROR(1/0;"Check value")
Expected result: Check value.
Why it works: Replace a calculation error with a readable message.
How to use it in your own spreadsheet
- Identify the cells or inputs that correspond to the sample values above.
- Enter the formula in an empty cell, changing the references or literal values to match your sheet.
- Compare the output with a manual check on a small known example.
- Extend the formula to a larger dataset only after you understand the result.
Common problems and practical checks
- Be explicit about the difference between TRUE/FALSE, zero, blank cells and text values.
- Consider how errors are handled instead of automatically suppressing them.
- A pasted formula may produce an error when it uses the other program’s argument separator or unsupported options.
Related functions
Documentation and verification
- LibreOffice Calc Help
- The standalone example was calculated using LibreOffice Calc 25.2.3.2 on October 9, 2026 and its computed result matched the expected value. This does not certify every option, version, or other example.