Contact

ERROR.TYPE Function (Gnumeric)

Information Beginner Gnumeric

Learn the ERROR.TYPE function in Gnumeric: Returns a number corresponding to one of the error values or #N/A if no error exists.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked

Validation limits: Expected outcomes were reasoned from the official manual and checksum-verified Gnumeric 1.12.62 source. No native Gnumeric execution or screenshots were performed.

Purpose

ERROR.TYPE turns a spreadsheet error value into a numeric code that can help categorize faulty calculations. It is useful for audits where #DIV/0! (zero denominator) should be handled differently from #N/A (unavailable data) or #REF! (invalid reference). The official Information reference documents the syntax and its common error mappings [R1].

Exact official syntax and arguments

=ERROR.TYPE(error)

The single required error argument is an error value or an expression/reference that evaluates to one. There is no documented second argument or default [R1]. Gnumeric’s official English manual uses a dot in ERROR.TYPE and a comma when other functions have multiple arguments; check your local spreadsheet language and argument separator before pasting formulas. The 1.12 manual covers this function, and official 1.12-series release indexing identifies 1.12.62 as the latest release at the October 12, 2026 review date [R1, R3]. Actual installation/plugin availability and application output were not tested.

Documented codes

Error value Expected numeric code Evidence
#DIV/0! 2 Official manual [R1]
#VALUE! 3 Official manual [R1]
#REF! 4 Official manual [R1]
#NAME? 5 Official manual [R1]
#NUM! 6 Official manual [R1]
#N/A 7 Official manual [R1]

Source-version detail: The checksum-verified official 1.12.62 source includes switch cases for #NULL! (1), #GETTING_DATA (8) and #SPILL! (9), as well as codes 2–7. These additional mappings are source-verified for that release; no native executable was run. [R2]

Reproducible formulas with expected results

Enter the following in blank cells and record the actual result during eventual native testing.

Formula Expected result Basis
=ERROR.TYPE(NA()) 7 NA() generates an error classified #N/A [R1].
=ERROR.TYPE(1/0) 2 Division-by-zero error class #DIV/0! [R1].
=ERROR.TYPE(SQRT(-1)) 6 A negative real input produces numeric-domain error #NUM!; formula outcome requires native confirmation.
=ERROR.TYPE("Ready") #N/A Nonerror input falls to the source implementation’s default [R2], not explicitly shown in manual; expected, not observed.

Practical worksheet: assign an error category

Use an inventory-import diagnostic to separate missing IDs from bad arithmetic. Set:

Cell Enter Expected evaluated value
A1 Test value Text heading
B1 Error code Text heading
A2 =NA() #N/A
A3 =10/0 #DIV/0!
A4 =9/3 3
B2 =IFERROR(ERROR.TYPE(A2),"No mapped error") 7
B3 =IFERROR(ERROR.TYPE(A3),"No mapped error") 2
B4 =IFERROR(ERROR.TYPE(A4),"No mapped error") No mapped error

Gnumeric’s IFERROR returns the replacement when its first argument evaluates to an error [R4]. ERROR.TYPE classifies recognized errors [R1]. The B4 result uses the inspected upstream implementation’s nonerror return path [R2] and must be checked in the target released version before relying on its results.

Advanced diagnostic pattern

A single audit formula can classify the common errors without hiding ordinary values:

=IF(ISERROR(A2),ERROR.TYPE(A2),"No error")

Expected: when A2 contains #N/A, the result is 7; when A2 contains =1/0, the result is 2; when A2 contains plain numeric 42, the result is No error. ISERROR is a Boolean test covering all error classes [R1]; IF evaluates its true/false branch based on that test [R4]. For unrecognized/new error classes, ERROR.TYPE may still return an error, so a reporting pipeline may need an outer IFERROR guard.

Troubleshooting and boundaries

  • Why does =ERROR.TYPE(12) not return a type code? ERROR.TYPE identifies error classes, not generic data. Use TYPE(12) for a value’s underlying data type [R1, R2].
  • Why #N/A instead of 7? A literal text string "#N/A" is not the same as the actual #N/A error. Test using NA() and confirm the argument reaches an error value [R1].
  • Why an unexpected error? The error may be outside the supported mapping of the running version; check the mapping supported by your installed release [R2].
  • Why is an entered formula rejected? Check that the dotted function name is correct and there is exactly one argument; locale-specific function syntax may vary [R1].
  • Need an error/no-error flag rather than a number? Use ISERROR or ISNA, which answer different questions and do not require a mapping table [R1].

Gnumeric documents this as Excel-compatible [R1]. The documented common codes 2–7 overlap the familiar Excel scheme, but feature-specific and more recent error types must be checked in each product/version separately; Gnumeric’s release source is not evidence about Excel or the published Gnumeric binary.

Related Gnumeric guides: TYPE, ISERROR, ISNA, ISERR, IFERROR, NA.

Official evidence and validation

Validation: Official manual and release-source review plus independent logical checks of the displayed examples. Native Gnumeric execution, screenshots, locale regression and workbook round-trip tests were not performed.