Contact

T Function (OpenOffice Calc)

Text Intermediate OpenOffice Calc

Learn the T function in Apache OpenOffice Calc: Returns a value if it is text, otherwise an empty string.

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

The T function in Apache OpenOffice Calc keeps a text value unchanged but returns an empty text string when given a number or a logical value. It does not format a number as text, and it does not hide spreadsheet errors. Use it when a mixed-type worksheet should retain labels while excluding numeric entries. [T1]

Quick answer

=T(A2)

If A2 contains the text red car, the expected result is red car. If A2 contains the number 123, the result is a zero-length text string, displayed as a visually empty cell. If A2 contains the error #N/A from =NA(), the error is passed through instead of becoming empty. These distinctions are directly supported by Apache’s T-function examples. [T1]

Do not confuse an empty text result with an untouched blank cell. Apache’s own check =ISTEXT(T(123.4)) returns TRUE, even though T(123.4) looks blank in the sheet. [T1, T2]

Official syntax, arguments and return value

=T(value)
Position Name Required? Accepted input and meaning
1 value Yes One value, expression, or single-cell reference, evaluated to determine whether it is text. Examples: "blue", A2, 123, FALSE().

There is one required argument, no optional argument, and no default to substitute for an omitted value. The English Apache documentation spells the function T. When value is text, T returns that text; when it is numeric or logical, it returns ""; an error is propagated. [T1]

The single-argument T call needs no argument separator. Compound formulas below use the semicolon (;) separator shown in Apache’s English-language IF examples. Other language/localization settings may use translated formula names or a different accepted separator; check the target Calc installation before copying multi-argument formulas. The distinction between a decimal point and a decimal comma matters for numeric literals, but not for the examples that use whole numbers and text. [T1, T5]

Software scope. Apache’s official site identifies Apache OpenOffice 4.1.16, released 2025-11-10, as the current release checked on 2026-10-12. Its T function wiki reference was last edited in 2024. Documentation of the function is not a claim of native execution in 4.1.16 or a claim that every platform/locale has identical UI formatting. [T1, T7]

Reproduce the results in a worksheet

  1. In an empty Calc sheet, enter Input in cell A1, Text-only output in B1, and Check in C1.
  2. Enter the formulas shown in the A input column below. A leading = marks a formula; do not type the explanatory arrows from the table. For row 8, leave A8 truly empty.
  3. Enter =T(A2) into B2. Drag or copy that formula down through B11, so each row refers to its own A cell.
  4. Compare your application results with the expected outputs. Where a result is empty text, it will usually look blank; inspect the formula bar or test with ISTEXT rather than assuming the cell is empty.

On smaller screens, scroll this table horizontally.

RowA input (enter as shown)Type of evaluated inputExpected result of B = T(A)Evidence
2="red car"Textred carApache text example [T1]
3=123Number"" (empty text)Apache numeric example [T1]
4=FALSE()Logical FALSE"" (empty text)Apache logical rule [T1, T6]
5="0042"Text digits0042 (leading zeros kept)Text is returned unchanged [T1]; expected
6=""Zero-length text"" (empty text)Text rule [T1]; expected, native edge check
7=NA()Error#N/A errorExplicit Apache error example [T1]
8Leave genuinely emptyNo entered value"" predictedInference from no-text rule; native check needed [T1, T2]
9=IF(1=1;"Ready";0)Text from the chosen branchReadyIF selects its branch [T5]; T text rule [T1]
10=IF(1=0;"Ready";0)Number from the chosen branch"" (empty text)IF selects 0 [T5]; T numeric rule [T1]
11=" red "Text with spaces red (spaces retained)T returns original text [T1]; expected

The table intentionally separates directly documented cases from inferred results. The error example T(NA()), the number example T(123.4), the text example T("red car"), and ISTEXT(T(123.4)) are explicitly documented by Apache. Blank references, zero-length-string formulas, and mixed IF branches should be confirmed natively before relying on release-specific edge behavior. [T1, T5]

Independent sanity checks (no application run)

These direct formulas have documentation-based expected outputs:

=T("red car")        → red car
=T(123)              → ""  (zero-length text)
=T(FALSE())          → ""  (zero-length text)
=T("0042")           → 0042
=T(NA())             → #N/A
=ISTEXT(T(123.4))    → TRUE

The arrows are explanation, not part of any Calc formula. The last check is particularly useful: if the output looks empty, the enclosing ISTEXT is still expected to report TRUE because T created a text string, not an empty cell. [T1, T2]

Practical scenario: retain product labels without confusing them with IDs

Suppose column A contains mixed imported data: some cells are labels, others are numeric order IDs. The business requirement is to populate a text-only presentation column without turning numeric IDs into labels by accident.

Row A (source data) Enter in B Expected B display Why
2 ="Parts" =T(A2) Parts The input is text.
3 =4821 =T(A3) (empty) The input is a number, which T suppresses.
4 ="004821" =T(A4) 004821 Textual SKU, including zeros, is retained.
5 ="Returns" =T(A5) Returns Another text label.

Steps: Enter the A values, place =T(A2) in B2, then fill down through B5. These are expected outcomes from Apache’s T type rule, not observed application screenshots. The preservation of 004821 as text is the crucial difference between a numeric identifier and a text identifier. [T1]

Important limit: This is a display/selection helper, not a data-cleaning or error-handling process. Do not use T to silently discard numeric identifiers if the underlying data must still be retained for reporting or reconciliation.

Advanced example: keep only text returned by an IF decision

Let D2 contain the numeric score 80, and D3 contain 30. In E2 enter:

=T(IF(D2>=50;"Pass";0))

Copy to E3. Apache’s IF(test; value1; value2) returns the chosen branch, and Apache’s T rule retains text but maps numbers to "". The documentation-derived predictions are Pass in E2 and empty text in E3. This calculation depends only on the comparison, the selected IF branch, and the text/numeric distinction. The exact result has not been natively tested in 4.1.16. [T1, T5]

For an explicit visible alternative, you generally do not need T:

=IF(D2>=50;"Pass";"Not passed")

That alternative returns text on both branches; it expresses the intended user message more clearly when a blank isn’t desired. Apache documents IF’s three positions and chosen-branch behavior. [T5]

Advanced example: examine a text result that looks blank

=ISTEXT(T(123.4))

Apache expressly shows TRUE for this test. It demonstrates why the visually empty result of T(123.4) must not be interpreted as an untouched cell. A further text-length check, =LEN(T(123)), is expected to return 0 by counting the characters in the empty string; the latter is a string-length deduction, not an observed test of T+LEN on OpenOffice 4.1.16. [T1, T2, T8]

T, TEXT, VALUE, ISTEXT and N are different tools

Function What Apache documents Best fit / caution
T(value) Keeps text, returns empty text for numbers and logical values, propagates errors. [T1] Filter a mixed scalar input by text type.
ISTEXT(value) Returns a logical test result about whether the value is text. [T2] Answer a yes/no type question instead of returning the text.
VALUE(text) Converts a recognized textual number, percentage, date or time to a number; separators depend on locale. [T3] Parse numeric text such as "50%" (which Apache documents as 0.5).
N(value) Returns a numeric value when possible, including numeric representations of logical values; not designed to parse numeric text. [T4] Numeric-oriented counterpart, but not a replacement for VALUE.
TEXT(...) Numeric-to-text formatting function included in Apache’s Text Functions catalogue. [T9] Formatting a number as readable text; check the exact format-string syntax in its own reference.

Common mistake: =T(123) does not return the characters 123. To make a formatted numeric value into text, follow the documented TEXT function rules; to parse existing text as numeric, use VALUE. Locale-aware parsing and formatting require testing on the target language/region, rather than assuming that commas and periods are interchangeable. [T1, T3, T9]

Errors, limitations and troubleshooting

  • #N/A is still an error. =T(NA()) is an Apache-documented #N/A example. T is not a universal error catcher. Resolve the underlying error or handle it deliberately; don’t call T an error-suppression function. [T1]
  • Output seems to disappear. If the input is numeric or logical, an empty text result is expected, not a failed calculation. Confirm the input’s type. To inspect the text type of the result, use Apache’s =ISTEXT(T(123.4)) sanity check. [T1, T2]
  • Digits are not necessarily a number. ="0042" yields a text value; =42 yields a number. T is not intended to parse numeric-looking text. VALUE is the conversion function for that purpose, with locale restrictions. [T1, T3]
  • Spacing changed upstream. T returns text rather than trimming it. Text with leading/trailing spaces should be handled separately (for example, by the TRIM function) if normalization is required; do not claim T itself removes spaces. [T1, T9]
  • Blank source cell versus formula returning "". A native check is still required for this precise pair. The documented T and ISTEXT rules imply the outputs shown in the table, but they do not establish every blank/reference edge case in OpenOffice 4.1.16. [T1, T2]
  • Extra/missing arguments. The official syntax has one required value. An expression like T(A2;B2) does not match the documented signature. Do not assert an exact error code without an application test. [T1]
  • Formula separators differ. T itself needs no separator; IF and other multi-argument formulas in the English Apache documentation use semicolons. Locale/language settings can change how formulas must be entered. [T1, T5]
  • Array/range inputs. The cited T page defines a single value; it does not establish stable 4.1.16 array behavior or a two-dimensional T transformation. Do not assume that =T(A2:A20) automatically generates a column of results. Test array behavior explicitly before recommending it. [T1, T10]
  • No verified alternative spelling. The documentation establishes the English spelling T. It does not establish an OpenOffice-specific TEXTONLY alias or version-suffixed variant; do not create duplicate pages. [T1, T9]

Compatibility and version/platform boundaries

Environment Verified from references Not verified here
Apache OpenOffice Calc documentation T(value) and core examples as stated by Apache. [T1] Every formula executed under today’s runtime.
Apache OpenOffice 4.1.16 Officially listed as released in November 2025, with desktop build download options. [T7] Platform-by-platform tests, unusual input types and array behavior.
Other OpenDocument spreadsheet editors This article makes no claim of identical implementation. Exact results, localized spellings, formula separators or error behavior must be tested in those programs.
Microsoft Excel / Google Sheets Their behavior is not evidence for Apache OpenOffice support. Version-specific function semantics and file-import differences.

An .ods file containing T may be exchanged between programs, but interchange alone does not prove that every imported formula, value type or error behaves identically. Verify important files in the application where users will run them.

Official sources

Official documentation checked 2026-10-12 (UTC). Sources may describe the historical function reference; a current release listing does not prove every edge case or imported-file behavior.

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.