ONLYOFFICE TYPE Function: Identify Number, Text, Boolean, Error and Array Values
Understand ONLYOFFICE TYPE return codes 1, 2, 4, 16 and 64 with a reproducible data-audit worksheet and edition-specific cautions.
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
Purpose: Return a numeric code describing the evaluated value type rather than the cell’s visible formatting or whether it contains a formula.
Quick answer and return-code table
=TYPE(A2) returns a number indicating what kind of result A2 contains. The ONLYOFFICE TYPE function reference lists these codes:
| TYPE output | Kind of value | Simple example |
|---|---|---|
1 |
Number | 27 |
2 |
Text | "27" |
4 |
Logical/Boolean | TRUE |
16 |
Error | #N/A or #DIV/0! |
64 |
Array | Array-valued argument; precise range/array behaviour requires native testing |
These are type codes, not error codes. A return of 16 does not identify which error occurred, and a return of 1 does not mean the number equals 1. For example, the numeric value 827 yields type 1.
Syntax and argument requirements
=TYPE(value)
| Parameter | Required | Meaning | Default |
|---|---|---|---|
value |
Yes | The value, reference or expression whose evaluated kind should be reported. | None documented |
The outer TYPE function needs just one argument and no delimiter. Nested functions such as IF use separators shown as commas in ONLYOFFICE’s English help. Localized versions may use different separators or names. The checked vendor page does not state exactly how every array-formula form or modern dynamic data type behaves; do not assume a spreadsheet-app-specific result without testing.
Reproducible worksheet: values that look alike
In a blank sheet, prepare the inputs in column A. Format A3 as Text before entering 0084. Enter each =... expression as a formula; do not paste the literal equal sign as plain text. In B2 enter =TYPE(A2) and fill through B9.
| Row | Enter into A | Expected value shown in A | Expected B: TYPE(A) | Explanation |
|---|---|---|---|---|
| 2 | 84 |
84 |
1 |
Numeric constant. |
| 3 | 0084 |
0084 |
2 |
Text ID, despite digit characters. |
| 4 | =TRUE() |
TRUE |
4 |
Formula returns a Boolean. |
| 5 | =NA() |
#N/A |
16 |
Formula returns an error. |
| 6 | ="Complete" |
Complete |
2 |
Formula returns text. |
| 7 | =1+1 |
2 |
1 |
Formula returns a number. |
| 8 | =1/0 |
#DIV/0! |
16 |
Formula returns an error. |
| 9 | ="" |
Visually empty string | 2 (expected; native check pending) |
Formula returns empty text, not a physically empty cell. |
The ordinary number, text, logical and error results follow the vendor’s return-code table and independent classification; the empty-string edge case requires native confirmation. Results are expected, not observed in a running ONLYOFFICE application.
Advanced use: prevent accidental arithmetic on text IDs
A warehouse export may store quantities as numeric-looking text. TYPE can help decide whether the input is actually numeric before arithmetic:
=IF(TYPE(A2)=1,A2*2,"Check data type")
With A2 = 84, expect 168. With A3 = text 0084, copying the formula to row 3 should return Check data type. The goal is not automatically to convert the ID; it is to detect a type mismatch before calculating.
To label errors without flattening other types:
=IF(TYPE(A5)=16,"Source contains error","No error value")
A5 contains =NA() in the worksheet, so the expected label is Source contains error. If this is used on A7, which evaluates to 2, it should return No error value. In this pattern TYPE classifies the evaluated result. To ask whether a cell contains an actual formula, use ISFORMULA(reference) instead.
Why number formatting is not enough
Formatting the display of a numeric cell as currency, a percentage or date does not make its underlying evaluated number into text. Conversely, an identifier like 0084 is still text even though it consists of digit characters. TYPE helps diagnose the storage/evaluation kind; it does not determine whether the input is semantically valid. Never interpret TYPE(A2)=1 alone as permission to sum all values in a data set.
Array code and version-specific limits
ONLYOFFICE’s reference documents 64 for an array-valued input but does not give an edition-specific matrix describing which array constants, dynamic arrays, range references or imported spill formulas are interpreted as arrays by TYPE. This guide therefore records 64 in the official code table, but does not supply an untested executable array-constant example as proven behaviour. To validate it, create an array output using functions supported by the target edition and check TYPE on the intended expression, recording the build, locale, formula and observed result.
The Microsoft Excel TYPE page includes an additional 128 (compound data) classification. That does not establish a corresponding code in ONLYOFFICE: the checked ONLYOFFICE page lists only 1, 2, 4, 16 and 64. Do not add the Excel-only 128 behaviour to an ONLYOFFICE result table.
Troubleshooting and common mistakes
| Observation | Why it happens | What to verify |
|---|---|---|
TYPE(A2) returns 1, though A2 displays 84 |
TYPE gives a code for numeric values, not the numeric value itself. | Understand type-code meaning. |
A digit-filled cell returns 2 |
It is text, perhaps from CSV import or leading apostrophe. | Inspect stored type; preserve identifiers when needed. |
A formula cell returns 1 instead of a special formula code |
TYPE classifies the formula result. | Use ISFORMULA to test formula presence. |
An error returns 16 |
All errors share the documented error type code. | Use ISNA/ISERR/ISERROR for a more specific classification. |
| A visually empty cell returns an unexpected type | Physical blanks and ="" differ. |
Inspect the formula bar; test with ISBLANK and ISTEXT. |
| Arrays behave differently across builds | Array support and input context may vary. | Run an edition-specific native fixture before making a compatibility claim. |
Cross-platform scope
The function is listed in the official unversioned English ONLYOFFICE Spreadsheet Editor function index. No release floor, full Docs-web/Desktop Editors compatibility matrix, or mobile-language behaviour was provided by the checked function article. The comparison with Microsoft’s documentation is evidence of related syntax and semantics, not a native import/export conformance test.
Official documentation and claim-by-claim checking
The exact function description and syntax are documented in ONLYOFFICE’s TYPE reference; the ONLYOFFICE Insert Function index lists it under the Information category. Both were checked on 2026-10-13 UTC. The index is unversioned online documentation, not an independently confirmed feature matrix for every Docs web, Desktop Editors or mobile version.
| Claim | Source | Verification |
|---|---|---|
Exact TYPE syntax and main return rule |
TYPE function reference | Documentation check only |
| Placement in vendor function inventory | Insert Function index | Documentation check only |
| English Formula-tab/manual entry and comma separators | Insert Function guide | English documentation check; locale variations untested |
| Cross-software context | Microsoft support | External documentation comparison only; not native compatibility test |
Verification limits: All table and advanced examples were independently classified from documented type/error rules and explicit inputs. No native ONLYOFFICE execution, localized formula test or cross-editor import test was performed. Blank, formula-empty and array edge cases remain qualified where noted.