IFERROR Function in ONLYOFFICE Spreadsheet Editor: Syntax and Worked Examples
Handle supported spreadsheet errors with an alternate value, without hiding data problems.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
IFERROR function in ONLYOFFICE Spreadsheet Editor
Quick answer: IFERROR evaluates an expression and, when that expression produces a recognized spreadsheet error, returns an alternative value you choose. Otherwise it returns the original result. It is useful for displaying a clear message instead of a division error, but it can also hide important problems, so choose the fallback carefully.
Vendor-confirmed syntax and arguments
=IFERROR(value, value_if_error)
| Argument | Required? | Purpose | Example |
|---|---|---|---|
value |
Yes | Value, formula or cell reference to evaluate. | B2/C2 |
value_if_error |
Yes | Result to return if value evaluates to an error. Can be a quoted message. |
"Review units" |
The ONLYOFFICE reference lists the intercepted errors as #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL!. It does not establish error handling for every possible add-on/application-specific error type. Both positional arguments are required in the documented syntax. Text fallbacks should be in quotes; a cell reference fallback is supplied without quotes. Errors are not the same as logical FALSE or numeric zero: a valid zero will be returned as zero, not replaced by the fallback.
Availability, version scope and formula entry
This function is listed in ONLYOFFICE’s current unversioned web help under logical functions. The official reference confirms the syntax described below, but does not identify the first version of Docs, Desktop Editors, or the mobile apps that implemented this function. The separate Docs release history and Desktop Editors release history are version-scoped records; their absence of a function introduction is not evidence that every old build supports it. No web-versus-desktop equivalence has been tested here. If you use an older build, search for this function in its Formula > Function dialog and run the sample before relying on it.
These formulas follow ONLYOFFICE’s English documentation and use comma-delimited arguments. Start with =, put text comparisons in double quotes, and do not type square brackets from the syntax notation. The official insertion guide says to separate arguments with commas and describes the Formula tab, function wizard and Shift+F3 shortcut. Interface language or locale may affect displayed formula names or separators; the exact behaviour for a non-English installation was not tested, so follow the separator in that installation’s own function wizard rather than assuming the examples paste unchanged.
Sample stock worksheet
Type this small table into a clean worksheet. Make columns B and C numeric, and keep all sample quantities as given.
| Row | A: Product | B: Total cost | C: Units |
|---|---|---|---|
| 1 | Product | Total cost | Units |
| 2 | Cable | 120 | 6 |
| 3 | Adapter | 90 | 0 |
| 4 | Case | 45 | 3 |
| 5 | Mouse | 0 | 0 |
| 6 | Keyboard | 210 | 7 |
Put formulas in a separate column such as D and drag/fill downward from row 2 to row 6. The sample results are independently computed and were not observed in the running ONLYOFFICE application.
First example: friendly unit-price display
Enter in D2:
=IFERROR(B2/C2,"Review units")
Expected result in D2: 20 because 120 / 6 = 20 without error. Copy the formula through D6:
| Cell | Source calculation | Expected result | Reason |
|---|---|---|---|
| D2 | 120/6 |
20 | Valid division |
| D3 | 90/0 |
Review units | Underlying #DIV/0! is handled |
| D4 | 45/3 |
15 | Valid division |
| D5 | 0/0 |
Review units | Another zero denominator |
| D6 | 210/7 |
30 | Valid division |
These outputs follow ordinary arithmetic and the vendor’s documented #DIV/0! interception rule. Not executed natively. To audit underlying data quality, temporarily inspect the division alone in a separate cell rather than assuming the fallback explains every possible source error.
Advanced example: distinguish an expected zero quantity from other failures
In E2 enter:
=IF(C2=0,"Quantity zero",IFERROR(ROUND(B2/C2,2),"Invalid numeric input"))
The outer IF handles the known business case explicitly. IFERROR is reserved as a second line of defence for an unexpected calculation error; ROUND(...,2) gives a two-decimal result when the division works. The argument order of IF and ROUND is separately documented in ONLYOFFICE IF help and ROUND help.
Expected E2:E6: 20, Quantity zero, 15, Quantity zero, 30. On the supplied data, the "Invalid numeric input" fallback is not exercised; therefore this example is not evidence of how a particular editor build handles malformed data. That is a native-test item, not an invented test outcome.
For presentation, format the numeric output cells as currency using cell formatting rather than typing a currency symbol into numeric source cells. This does not change the meaning of IFERROR.
What IFERROR does—and does not—fix
- It can replace a documented error code, but it does not repair the source formula or distinguish a missing reference from division by zero when you use the same catch-all fallback for both.
- An error is not a blank, and a successful zero is not an error. A zero result remains zero under
=IFERROR(0,"Bad")(expected0). - A fallback of
""makes an error look visually blank, which might hide data-quality problems from reviewers. Use an explicit diagnostic label during development where appropriate. - Use
IFNAwhen only#N/Ashould be intercepted; ONLYOFFICE IFNA documentation explicitly limits its fallback to#N/A. This distinction is important for lookup workflows because a#REF!should not automatically be mistaken for “item not found.” - The vendor’s IFERROR help does not fully specify blank-argument coercion or dynamic-array expansion across every build. Microsoft Excel documents additional behaviours for blank args and arrays; do not transfer those claims to ONLYOFFICE without separate testing.
Cross-software compatibility and limitations
The official Microsoft Excel IFERROR page documents the same two-argument signature and seven common intercepted errors. Excel also separately documents how blank input arguments and array formulas behave; ONLYOFFICE’s current IFERROR page does not provide equivalently detailed rules. This is a documentation gap, not a demonstrated incompatible implementation. The presence of the same function name cannot guarantee parity between Excel, ONLYOFFICE Docs web editing, Desktop Editors and mobile versions.
Troubleshooting workflow
- Test
=B2/C2without IFERROR in an otherwise empty cell. If the row has zero units, the expected arithmetic has a zero-denominator problem; the fallback is not solving the underlying data issue. - Check that numeric-looking totals and quantities were entered as numeric cells. A value like
"six"instead of6should be corrected in source data rather than silently hidden with a fallback. - Check whether a misspelled function, invalid reference or misplaced parenthesis is obscuring the intended logic. Use Formula > Insert Function to verify the two argument positions.
- For a suspected lookup failure, distinguish
#N/Afrom an invalid#REF!and considerIFNAinstead ofIFERRORwhen preserving other errors matters. - If source data updates do not appear, inspect the raw formula and trigger recalculation from the Formula tab, as described in the ONLYOFFICE insertion guide. Locale-dependent argument separators have not been tested in this batch.
Related internal pages and link status
Official reference and verification
- ONLYOFFICE Spreadsheet Editor — function documentation
- Docs release history
- Desktop Editors release history
- official insertion guide
- ONLYOFFICE IF help
- ROUND help
- ONLYOFFICE IFNA documentation
Verification status: Official documentation checked; example outcomes were independently reasoned or arithmetically checked where applicable. Not executed in ONLYOFFICE Spreadsheet Editor.
- No genuine ONLYOFFICE Spreadsheet Editor screenshots are included; this guide does not use mock application images.