Contact

TYPE Function (OpenOffice Calc)

Information Intermediate OpenOffice Calc

Identify numbers, text, logical values, formulas, errors, and arrays with TYPE in Apache OpenOffice Calc.

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

TYPE function in Apache OpenOffice Calc: identify data and formula types

The TYPE function returns a numeric code that describes what Calc recognizes about the argument: number, text, logical value, formula, error, or array. It is useful when auditing imported sheets, explaining why a calculation behaves unexpectedly, or distinguishing a typed value from a formula. It does not tell you whether the content is correct, and its treatment of formulas differs from Microsoft Excel. [AO-TYPE]

Quick answer

  • Syntax: =TYPE(value).
  • Only argument: value — required; a literal, expression, reference to a cell, or supported array expression. It has no optional arguments or defaults. The returned result is an integer code, not the value itself. [AO-TYPE]
  • Typical outputs: 1 numeric (including a genuinely empty cell), 2 text, 4 logical value, 8 formula, 16 error, 64 array. A formula that evaluates to an error is categorized as 16, not 8. [AO-TYPE]
Code Apache’s meaning Important qualification
1 Number A truly empty referenced cell is also reported as 1.
2 Text A quoted string is text; text digits are not automatically the same as numeric digits.
4 Logical value Calc’s Boolean display and numerical representation differ from Excel; use a genuinely logical-formatted value when evaluating this category.
8 Formula Calc recognizes formula-containing cells; this does not mean the formula’s result is text or numeric.
16 Error Takes precedence when a cell contains a formula returning an error, such as =NA().
64 Array The array expression is recognized, which differs from one scalar cell belonging to an array formula.

The code table and error/blank precedences are from Apache’s dedicated TYPE reference; the Boolean formatting caveat is from Apache’s ISLOGICAL and logical-value documentation. [AO-TYPE] [AO-ISLOGICAL] [AO-LOGICAL]

Syntax and argument details

=TYPE(value)

value (required): Give exactly one input. A literal number (42), a text literal ("dog"), a cell reference (A2), or an array argument can be appropriate. In the one-argument form there is no separator to type. In larger Calc formulas such as IF, use the Calc semicolon separator shown below; decimal and display formats may vary with your language/locale. Curly-brace array constants have their own ; column and | row delimiters in Apache’s documented syntax. [AO-TYPE] [AO-ARRAYS] [AO-MIGRATION]

Version/platform scope: The officially listed released download on 2026-10-12 was Apache OpenOffice 4.1.16 (Windows, macOS, Linux); 4.1.17 was announced as in preparation on 2026-09-26, not established as released by the download listing. The Apache function wiki is historical documentation, not a claim of execution in 4.1.16 on every platform or language. [AO-DOWNLOADS] [AO-416] [AO-DEVELOPMENT]

Reproduce a five-row TYPE audit

Open a new Calc worksheet. Enter the contents of column A exactly as described; then type the formula shown in column B. Do not paste a leading = into the literal-text input in A2. Leave A3 genuinely untouched (do not enter a space or ="").

Cell Enter this in column A Formula in column B Expected result in B Basis
A1 / B1 42 (number) =TYPE(A1) 1 Official code for numeric content.
A2 / B2 dog (text) =TYPE(A2) 2 Apache’s dog example.
A3 / B3 Leave A3 empty =TYPE(A3) 1 Apache explicitly classifies a blank reference as numeric here.
A4 / B4 =2+3 (formula giving 5) =TYPE(A4) 8 Apache identifies a formula cell by code 8; expected from its rule.
A5 / B5 =NA() (error formula) =TYPE(A5) 16 Apache explicitly documents this error-precedence example.

These are documentation-based expected outcomes. B1, B3 and B4 extend Apache’s rules to simple example cells; their numerical calculations/branches were independently reasoned, but the five cells were not run in Apache OpenOffice. [AO-TYPE]

How to interpret the audit

  1. A blank is not proof of a usable number. TYPE(A3)=1 even though A3 has no entry. To check if A3 is actually empty, use =ISBLANK(A3) instead of treating code 1 as proof of data. [AO-TYPE] [AO-ISBLANK]
  2. A formula can mask the type of its result. A4 displays 5 but TYPE(A4) is expected to report the formula category 8; Excel’s TYPE may instead classify the returned result. [AO-TYPE]
  3. An error wins over formula status. A5 is a formula, but TYPE(A5)=16 is documented. Do not assume that TYPE(cell)=8 finds every cell with a formula. [AO-TYPE]
  4. TYPE is not the same as a test of correctness. =TYPE(A2) returning 2 confirms classification as text but does not validate spelling, identity, or whether the text belongs in that column. [AO-TYPE]

Quick individual formulas

=TYPE(42)
=TYPE("dog")
=TYPE(A3)

Expected outputs are 1, 2, and (if A3 is truly empty) 1, respectively. Double quotes mark an inline text string. These outcomes follow Apache’s documented classification table. [AO-TYPE]

Logical values (4): Apache lists code 4, but Calc’s underlying Boolean handling depends on a logical value/Boolean formatting. An ordinary numerical cell containing 1 must not be assumed to have TYPE code 4. For a Boolean-format test, create a separate cell using Calc’s Format → Cells → Boolean Value and compare it with a plain numeric cell, then document what your installed version actually returns before relying on that test in an automated audit. This format-sensitive example was not natively executed here. [AO-TYPE] [AO-ISLOGICAL] [AO-LOGICAL]

Practical use: flag typed notes, calculations and errors

Suppose column A holds imported inventory observations: a manually typed quantity, an explanatory note, or a formula. Put a label in B1 and this helper in B2 (assuming A2 is manual text such as backordered):

=IF(TYPE(A2)=2;"Manual text";"Other content")

Expected result: Manual text for the manually typed text cell. The helper is just a classification label, not an input validator; a formula returning a text result can be classified under code 8 instead. If you want to flag formulas, compare with code 8 but separately handle code 16 for error formulas. The semicolons separate arguments to IF in Calc. [AO-TYPE] [AO-LOGICAL] [AO-MIGRATION]

A second formula applied to A5 from the first table:

=IF(TYPE(A5)=16;"Check error";"No TYPE error")

Expected result: Check error, using the Apache error-priority rule. This expression is a documentation-derived example, not an observed live result. In complex nested error expressions Calc may propagate errors unexpectedly (Apache documents a separate issue involving ISERROR(CHOOSE(...))), so confirm complex variants in your own version before using them as safeguards. [AO-TYPE] [AO-ISERROR]

A simple formula check applied to A4:

=IF(TYPE(A4)=8;"Formula cell";"Not a nonerror formula")

Expected result: Formula cell, under the documented code-8 rule. The wording deliberately excludes error formulas, which can return code 16. [AO-TYPE]

Advanced: array arguments, not just array cells

Apache documents:

=TYPE({3;5;7})

Documented result: 64. This is one inline array with three elements. In Apache’s Calc array notation, semicolons separate columns within a row; the pipe character | separates rows. Do not convert the braces or separators mechanically from Excel or LibreOffice without verifying the target program’s syntax. [AO-TYPE] [AO-ARRAYS]

To see the difference between an array passed to TYPE and a normal range intersection:

  1. Put numeric 17 in A1 and text dog in B1.
  2. Select A3:B3, enter =TYPE(A1:B1) as an array formula using Ctrl+Shift+Enter (or the Formula Wizard’s Array option). Apache documents 64 in both A3 and B3 because the range is an internal array argument in array-formula context. [AO-TYPE] [AO-ARRAYS]
  3. For comparison, enter the same text =TYPE(A1:B1) normally (press Enter) in both A5 and B5. Apache documents that Calc takes the column intersection: A5 examines A1, while B5 examines B1. With the above entries their expected results are 1 and 2, respectively. [AO-TYPE]

This is based on Apache’s example and its array documentation; the keyboard sequence and expected results were not executed in an installed build. Do not casually copy a multi-cell array result into a single-cell formula or infer that every array formula’s constituent cell has TYPE 64; Apache separately documents TYPE 8 for a scalar cell that participates in an array formula. [AO-TYPE]

Troubleshooting and interpretation limits

Symptom Why it happens Practical check
TYPE(empty_cell) says 1 Apache treats the truly blank reference as numeric for this function. Use ISBLANK to detect a genuinely empty cell; a formula returning empty text is not identical to an untouched cell. [AO-TYPE] [AO-ISBLANK]
A formula returning 5 says 8 Calc’s TYPE reports formula status, not merely the evaluated data type. Inspect whether the source cell contains a formula; do not expect Excel’s corresponding result. [AO-TYPE]
A formula that shows #N/A says 16 Error precedence overrides formula classification. Inspect the error and use ISERROR/ISNA if you specifically need an error test. [AO-TYPE] [AO-ISERROR]
A typed 1 is not categorized as logical 4 Numeric and Boolean formatting/interpretation are distinct. Check the actual format and ISLOGICAL, and repeat natively before relying on type 4. [AO-TYPE] [AO-ISLOGICAL]
=TYPE("dog";2) reports an argument error TYPE has exactly one argument. Use =TYPE("dog"). [AO-TYPE]
IF(...,...) copied from Excel fails to parse Calc commonly uses ; between arguments, not Excel’s commas. Change only the argument separators appropriately, avoiding array constants. [AO-MIGRATION]
A range behaves differently under Enter and Ctrl+Shift+Enter Normal scalar evaluation selects an intersecting cell; array context evaluates an array. Follow the two distinct examples above and the official array-entry procedure. [AO-TYPE] [AO-ARRAYS]
An array argument doesn’t work as expected Arrays have different separators and rules for constants, array formula entry and ranges. Simplify to =TYPE({3;5;7}) from Apache’s example; verify your Calc version. [AO-TYPE] [AO-ARRAYS]

For any result not matching these documented expectations, inspect the input type, the cell’s formula bar, formatting, array-entry mode, and the installed product version before inferring an undocumented function bug.

Compatibility: Apache OpenOffice versus other spreadsheets

Apache explicitly identifies a material Microsoft Excel difference: Calc can return 8 for a formula, whereas Excel’s TYPE classifies the formula’s evaluated result instead. A validation workbook relying on code 8 must not be assumed portable. Similarly, do not assume that identical function names or array delimiters guarantee equal behavior in LibreOffice, Excel, Google Sheets, or other software. No cross-application execution was performed for this guide. [AO-TYPE] [AO-MIGRATION]

The label TYPE is also easy to confuse with the unrelated type parameter in financial functions such as PV; the former is the one-argument information function described here. [AO-TYPE]

  • CELL — additional cell metadata and the distinct text labels b, l, v.
  • ISBLANK — true empty-cell check, unlike the TYPE code 1 shorthand.
  • ISFORMULA — specifically test whether a cell contains a formula.
  • ISNUMBER and ISTEXT — targeted number/text tests.
  • ISLOGICAL — logical values and their formatting caveats.
  • ISERROR and ISNA — tests for spreadsheet errors.
  • IF — return labels based on a TYPE condition.

Official references and verification

Official source access date: 2026-10-12 (UTC). This uses primary Apache OpenOffice pages, which may describe historical behavior; no claim is made of observing results in Apache OpenOffice 4.1.16. Bracketed source identifiers used above map to these URLs:

Verification status: Official Apache documentation checked; simple expected outputs independently reasoned from documented code rules. Not executed in Apache OpenOffice Calc. No genuine application screenshots are provided; no mocked screenshots are used. Complex error expressions, Boolean formatting and localized installations require native confirmation before relying on these cases.

Validation note

The examples show expected results checked against Apache OpenOffice documentation and independent arithmetic, text mapping, or logical reasoning. They were not run in Apache OpenOffice Calc. Platform, locale, import, and unusual error cases are not certified.