T Function (Gnumeric)
Learn the T function in Gnumeric: Returns a value if it is text, otherwise an empty value.
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: Examples are independently reasoned expectations from official documentation and checksum-verified release source. Native Gnumeric execution and screenshots were not performed.
What T does — and when it helps
T returns its argument only if that value is text; for a value that is not text it returns an empty value. In the verified 1.12.62 source this is value_new_empty(), not construction of an empty text string. This makes T useful for a text-only display column fed by a worksheet containing both numeric measurements and free-text comments [R1]. It is not a general conversion-to-text function: using it on a numeric identifier can hide the identifier rather than display it.
For example, where A2 contains the text Checked and A3 contains numeric 42, the results expected from =T(A2) and =T(A3) are Checked and an empty result, respectively [R1]. The formula remains present even when its result looks blank; do not infer the exact value type solely from its display.
Official Gnumeric syntax and arguments
=T(value)
| Position | Argument | Required? | Type / default |
|---|---|---|---|
| 1 | value |
Yes | Value or reference to inspect, such as text or number; no default. |
Gnumeric’s String manual documents the signature T(value), with exactly one argument [R1]. The formula begins with = in the worksheet. value can be a literal ("Checked") or an A1-style cell reference. All examples below use English function names and the documentation’s comma form for any other functions with multiple arguments; regional formula separators and translated function names can differ with application settings. T itself has only one argument, so there is no internal argument separator or locale decimal setting to adjust in the shown calls. Do not treat numeric-looking text as a number unless it was actually entered/stored as one.
Version scope: Gnumeric 1.12 series, release 1.12.62; official catalogue lists t under String with implementation Complete and project testing Basic [R2, R3]. These are upstream catalogue labels, not evidence of a local native-execution test or proof of an enabled function in every installation.
Reproducible direct examples
Enter the formulas into otherwise empty cells, or copy the values into A2:A6 and fill down =T(A2) beside them.
| Input / formula | Expected displayed result | Reason and evidence |
|---|---|---|
=T("Checked") |
Checked |
Text is retained [R1]; independently reasoned. |
=T("007") |
007 |
Text with leading zeros stays text [R1]; independently reasoned. |
=T(42) |
An empty result | Numeric input is not text [R1]; independently reasoned. |
=T(1=1) |
An empty result | Boolean is not text; documented type rule, native check outstanding [R1]. |
=T("") |
An empty string "" |
Already-empty text stays empty [R1]; independently reasoned. |
=LEN(T("Desk")) |
4 |
Text remains four characters; LEN documented in the same manual [R1]. |
For T(""), the empty input string remains a string. For nontext inputs the release callback instead returns an empty value; the rendered blank display does not establish equivalence. The Boolean/blank/error boundary cases should be tested in Gnumeric before relying on them; no exact error-propagation behavior has been inferred solely from another spreadsheet application.
Practical worksheet: mixed text and numeric notes
Create a small quality-control log:
| Cell | Enter | Why |
|---|---|---|
| A1 | Reading or remark |
Input column title |
| B1 | Text-only remark |
Output column title |
| A2 | All clear |
Text input |
| A3 | 19 |
Numeric input (not the text "19") |
| A4 | Further review |
Text input |
| B2 | =T(A2) |
Expected All clear |
| B3 | =T(A3) |
Expected empty result |
| B4 | =T(A4) |
Expected Further review |
Now change A3 from a numeric 19 to the text "19" (for instance by explicitly storing it as text). The expected B3 result becomes 19; the worksheet display alone does not tell you the underlying cell type [R1]. Use the existing ISTEXT page for explicit type testing, rather than inferring type from appearance.
Advanced pattern: show a marker only for nontext input
For a single input in A2, Gnumeric documents the related information function ISTEXT in its Information category, and IF in its Logic category [R1, R4, R5]. In English, a conditional illustration is:
=IF(ISTEXT(A2),T(A2),"[non-text]")
Expected: Confirmed when A2 contains text Confirmed, and [non-text] when A2 contains the number 12. This combined example is a documentation-based prediction, not a native application test. Depending on locale, the comma separators in IF may need replacement with the application’s configured argument separator. For a text-only column without the marker, the simpler =T(A2) is sufficient.
Troubleshooting and limits
- The result is blank when the original cell visibly contains 7. The source may hold the number 7.
Tdoes not turn numeric values into strings [R1]. To format a number as text, investigate Gnumeric’sTEXT(value,format)instead. - A code like 007 disappeared. Confirm that the identifier is stored as text before
Truns. A numeric 7 formatted to display leading zeros is still a number and is expected to yield an empty result under the documented rule. - I need to remove hidden characters.
Tdoes not clean or trim its text argument. For text cleaning, seeCLEANandTRIMseparately; their purposes are documented independently [R1]. - The source cell is empty or contains an error. The exact effect of a genuinely empty reference versus a formula returning
"", and Gnumeric’s error propagation for a reference holding an error, are not claimed tested here. Verify these cases natively before relying on them in an audit. - I supplied two values. Only
T(value)is documented. An extra argument is outside the official signature; the exact displayed failure code was not measured [R1]. - Imported file behaves unexpectedly. Recheck the actual stored type and workbook locale on import; documentation compatibility is not evidence that all coercion and error handling is identical.
Excel/other-product compatibility and related functions
The Gnumeric manual explicitly marks T as Microsoft Excel compatible [R1]; that is a function-level compatibility indication, not validation of all versions, imported files, locales, or other vendors. This guide does not borrow unverified LibreOffice behavior. It is appropriate to use T only when dropping nontext values is deliberate.
Related Gnumeric guides: ISTEXT · N · CLEAN · TRIM · LEN.
Primary source verification: Gnumeric 1.12.62 official archive was checked against GNOME’s SHA-256 checksum; the relevant callback was inspected without compilation or execution.
Official reference and review provenance
- [R1] Gnumeric official 1.12 User Manual, String category:
Tsynopsis and Excel compatibility;LEN,TEXT,CLEAN,TRIMsynopsis. https://gnome.pages.gitlab.gnome.org/gnumeric/manual/CATEGORY_String.html (accessed 2026-10-12, headings T, LEN, TEXT, CLEAN, TRIM). - [R2] Official Gnumeric function catalogue:
tString implementation Complete, project testing Basic; presence and upstream classification only. https://gnome.pages.gitlab.gnome.org/gnumeric-web/functions.shtml (accessed 2026-10-12). - [R3] Gnumeric 1.12.62 official release announcement: confirms release scope. https://gnome.pages.gitlab.gnome.org/gnumeric-web/announcements/1.12/gnumeric-1.12.62.html (accessed 2026-10-12).
- [R4] Gnumeric official User Manual, Information category:
ISTEXT(value)checks whether the value is text. https://gnome.pages.gitlab.gnome.org/gnumeric/manual/CATEGORY_Information.html (accessed 2026-10-12, heading ISTEXT). - [R5] Gnumeric official User Manual, Logic category:
IF(cond,trueval,falseval)syntax and conditional evaluation. https://gnome.pages.gitlab.gnome.org/gnumeric/manual/CATEGORY_Logic.html (accessed 2026-10-12, heading IF).
Validation: Official manuals and checksum-verified Gnumeric 1.12.62 source inspected; example logic and arithmetic independently checked. No native Gnumeric execution, screenshots, locale regression or workbook round-trip tests were performed.