ONLYOFFICE ERROR.TYPE Function: Identify Spreadsheet Errors by Code
A step-by-step ONLYOFFICE ERROR.TYPE guide with a reproducible error-audit worksheet, codes 1–8, precise error handling and testing caveats.
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
Quick answer: ERROR.TYPE converts a real spreadsheet error value into its documented number. For example, =ERROR.TYPE(1/0) is expected to return 2, identifying division by zero. It does not repair the underlying error. If its argument is not an error, the vendor documents #N/A as its result. This is useful when an inventory import has several different failures and a single ISERROR flag is not detailed enough.
The ONLYOFFICE ERROR.TYPE reference supports the syntax and number mapping below. The worked results are independently reasoned or arithmetically checked, not observed in ONLYOFFICE.
Syntax, argument types and defaults
=ERROR.TYPE(error_val)
| Argument | Required? | Input | Default |
|---|---|---|---|
error_val |
Yes | A spreadsheet error expression, or a reference such as A2 to a cell that evaluates to an error. |
None specified in the vendor reference. |
There is one argument, not a pair of error and replacement arguments. It evaluates the error value to a numeric category; for a non-error, its documented output is #N/A. The vendor does not document an omitted-argument default. Do not type an error name in quotation marks expecting it to be treated as an error: "#DIV/0!" is a string.
The complete codes documented by ONLYOFFICE
| Underlying spreadsheet error | ERROR.TYPE result |
How to interpret it |
|---|---|---|
#NULL! |
1 |
Null-intersection error. |
#DIV/0! |
2 |
An operation attempted to divide by zero. |
#VALUE! |
3 |
Incompatible input value/type. |
#REF! |
4 |
Invalid reference. |
#NAME? |
5 |
Unrecognized name or function. |
#NUM! |
6 |
Invalid numeric operation or numeric argument. |
#N/A |
7 |
Not-available value (a real error, not text). |
#GETTING_DATA |
8 |
A listed data-loading error. |
| Anything else | #N/A |
No recognized spreadsheet error was supplied. |
Source: ONLYOFFICE’s code table, accessed 2026-10-13. The table describes mapping, not which errors are easy to provoke in a given edition. In particular, code 8 is documentation-only here: no native #GETTING_DATA fixture was produced. The vendor table does not provide a code for every newer Excel-specific error message.
Reproducible exercise: audit formula outcomes
In a blank worksheet, put the following values/formulas in A2:A6. For entries beginning with =, enter them as formulas rather than as text. Then enter =ERROR.TYPE(A2) into B2, and fill down through B6. Column B outputs below are expected results.
| Cell | Enter in column A | Expected A display | Formula in column B | Expected B display |
|---|---|---|---|---|
| A2 | =1/0 |
#DIV/0! |
=ERROR.TYPE(A2) |
2 |
| A3 | =NA() |
#N/A |
=ERROR.TYPE(A3) |
7 |
| A4 | =SQRT(-1) |
#NUM! |
=ERROR.TYPE(A4) |
6 |
| A5 | =10/2 |
5 |
=ERROR.TYPE(A5) |
#N/A |
| A6 | Ready (plain text) |
Ready |
=ERROR.TYPE(A6) |
#N/A |
Why: Division by zero produces the error in code 2. The documented NA function deliberately supplies a real #N/A, code 7. The official SQRT reference states that negative input produces #NUM!, code 6. The last two cells have no spreadsheet error; ERROR.TYPE itself therefore returns #N/A. No workbook engine was run to observe these displays.
Try a direct one-cell test too:
=ERROR.TYPE(1/0)
Expected 2, by the same documented mapping. This avoids ambiguous CSV import and cell type conversions when first testing an installation.
Advanced pattern: a readable diagnostic column that does not fill with #N/A
Instead of placing raw ERROR.TYPE codes in B2:B6, use a separate C column:
=IF(ISERROR(A2),ERROR.TYPE(A2),"OK")
Copy down to C6. Expected results: C2 2, C3 7, C4 6, C5 OK, C6 OK. The ONLYOFFICE ISERROR reference describes a TRUE/FALSE error test, while IF selects the result associated with the condition. This creates a useful audit without treating a valid price or text label as a failure.
Alternatively, for a report that needs text status rather than a distinction between a plain value and a formula error:
=IFERROR(ERROR.TYPE(A5),"No recognized error")
Expected No recognized error, because ERROR.TYPE(A5) itself returns #N/A. In contrast, =IFERROR(ERROR.TYPE(A3),"No recognized error") is expected to return 7, because the outer ERROR.TYPE calculation succeeded. This is a subtle but important distinction: a numeric code 7 means the input was #N/A; a visible #N/A as the ERROR.TYPE output can mean the input had no error. See ONLYOFFICE IFERROR.
Keep a copy of the original error-bearing cells during investigations. Replacing errors with zeroes for later SUM calculations can conceal missing data or incorrectly change business totals.
Troubleshooting decision table
| Symptom | Likely cause | What to check |
|---|---|---|
ERROR.TYPE(A5) displays #N/A although A5 is 5 |
A5 is not an error. This is the function’s documented fallback. | Use ISERROR(A5) if you only need TRUE/FALSE. |
Input shows #N/A but its code isn’t 7 |
The entry may be text rather than a real #N/A error. |
Enter =NA() in a clean cell and test that reference. |
Code is 6, not 2 |
#NUM! and division by zero are different errors. |
Inspect the upstream calculation; compare the explicit SQRT example. |
| Formula displays a parsing or name error | Misspelled function name, locale or an unsupported edition. | Use the Formula → Function dialog and the installed build’s help. |
| Another application shows a code not listed above | Different engines can have additional error types. | Check that application’s error table; do not import codes as though universally portable. |
Someone used IFERROR(...,0) everywhere |
Data and formula problems may be disguised as true zeroes. | Retain a separate diagnostic column before deciding whether to mask errors. |
Locale and user-interface notes
The English function documentation uses ERROR.TYPE(error_val) and the examples above use the English names. The official Insert Functions guide demonstrates comma-separated arguments for multi-argument formulas, such as IF. A localized installation might use a different display name or argument separator; its exact mapping has not been checked here. Use the built-in Function Arguments window when a copied formula fails to parse.
ONLYOFFICE Docs online versus Desktop Editor and Excel
The ONLYOFFICE Formula tab guide shows separate online and Desktop interfaces, but the ERROR.TYPE function page provides no per-version introduction number or Desktop/web test matrix. Documentation presence must not be read as proof of execution on every installation. There has been no native execution in Docs web, Desktop Editors, mobile or imported XLSX files for these examples.
Microsoft’s Excel ERROR.TYPE reference documents the same standard 1–8 table, useful as a compatibility comparison. It is not proof of behaviour in ONLYOFFICE, and any newer Excel-specific error classes require separate verification.
Official sources and verification
- ONLYOFFICE — ERROR.TYPE: syntax, error code table and
#N/Afor non-errors. - ONLYOFFICE — NA, SQRT, ISERROR, IF, IFERROR: claims used by the reproducible exercises.
- ONLYOFFICE — Insert Functions and Formula tab: user-interface and documentation scope.
- Microsoft — ERROR.TYPE: Excel comparison only.
Sources checked: 2026-10-13. The error mapping and example classifications were reviewed against official documentation and independent arithmetic/type reasoning. No native ONLYOFFICE execution was performed. Historical release support, localized entry and additional error classes remain untested.