Text functions

T

Matches all 1,233 recorded answers

Recorded: 1,227 in the answer bank and 6 workbook cells. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicT
BulgarianВ
CzechČt
DanishT
GermanT
GreekT
English (Australia)T
English (United Kingdom)T
English (United States)T
SpanishT
EstonianT
FinnishT
FrenchT
Hebrewה‘
CroatianU
HungarianT
IndonesianT
ItalianT
JapaneseT
KoreanT
LithuanianA
LatvianT
NorwegianT
DutchT
PolishT
Portuguese (Brazil)T
Portuguese (Portugal)Q
RomanianT
RussianT
SlovakT
SlovenianT
Serbian (Latin)U
SwedishT
Thaiพฤ.
TurkishT
UkrainianT
VietnameseT
Chinese (Simplified)T
Chinese (Hong Kong)T
Chinese (Traditional)T

Names from Microsoft's support site.

What it does

T(value)

T(value) is a type filter, not a converter. Microsoft's rule:

If value is or refers to text, T returns value. If value does not refer to text, T returns "" (empty text).

Read that twice, because the function's name and its one-line catalogue description ("Converts its arguments to text") both point away from what it does. T does not render a number as text. T(42) is not "42" — it is the empty string. A number is not text, so the filter rejects it.

The quoted one-line description is Microsoft's text, from its support article https://support.microsoft.com/en-us/office/t-function-fb83aeec-45e7-4924-af95-53e073541228.

Stated as a rule over the value universe:

value isT(value)
Textthat same text, unchanged
Number""
Logical""
Errorthat error — errors are values and propagate
Empty""

T is one of only two single-letter worksheet function names (N is the other), and the two are a matched pair: T passes text through and blanks everything else, N passes numbers through and zeroes everything else. Both exist for the same reason, which Microsoft states plainly: they are provided for compatibility with other spreadsheet programs, and you do not generally need them, because Excel converts values as necessary on its own.

A consequence worth naming: T is the shortest way to ask "is this cell text?" without ISTEXT — T(A1)="" is true for every non-text value and for empty text alike, which is exactly why it is not a substitute for ISTEXT.

Arguments

ArgumentMeaning
valueThe value to test. Required, and the only argument.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

Returns Text, or propagates an Error.

The cases that matter:

  • Numbers, including dates and times. A date is a number wearing a format (The value universe), so T on a date cell is "". The formatted display never reaches the function.
  • Logicals. TRUE is not text; T(TRUE) is "".
  • Empty cells. "".
  • Numeric-looking text. T("42") is "42". The value is text; that it reads as a number is irrelevant, because T filters by kind and not by content. This is the mirror image of the SUM("3") versus SUM(A1) asymmetry described in Coercion and lifting, and it is the cleanest available demonstration that Excel's kind distinction is real rather than cosmetic.
  • Errors. An error value propagates rather than becoming "". T does not swallow errors; it is not a guard.

Errors

Microsoft's T page documents no error conditions of its own, and the function has no domain to violate: every value kind has a defined answer. The only errors reachable here are incoming ones, which propagate under the shared rule in Coercion and lifting.

How to implement

Notes for implementers

The whole function is a match on the value kind. The only ways to get it wrong are to convert instead of filtering (returning "42" for T(42)), or to absorb errors instead of propagating them.

The Empty case is worth an explicit branch rather than a fall-through: T on an empty cell and T on empty text produce the same visible answer for different reasons, and the shared model keeps Empty distinct from text precisely so functions can treat them distinctly.

T is a good regression canary for a value-kind implementation. Because it returns the input unchanged for exactly one kind and a constant for every other, a T disagreement is almost always a value-kind bug somewhere upstream rather than a bug in T.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

T · 12 lines · calc-func/src/catalogue/text_functions.rs on GitHub
27 t_fn "T" (1, 1) [V "value"] |s, a, sv| {
    match a[0].core_ref() {
        CoreRef::Text(_) => Ok(a[0].clone()),
        CoreRef::Error(code) => fail(code),
        CoreRef::Number(_) | CoreRef::Logical(_) | CoreRef::Empty | CoreRef::Missing
            if a[0].callable_value().is_none() =>
        {
            Ok(CalcValue::text(ExcelText::from_utf16_code_units(Vec::new())))
        }
        _ => Err(s.not_modelled(Some(0))),
    }
}

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20430Windows, 64-bit, CPU not recorded1,227

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20430

Windows, 64-bit, CPU not recorded

1,227 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.

Alternatives

Relationships

  • N — the numeric mirror. N(value) returns the number if value is a number, 1 for TRUE, a serial for a date, and 0 for text. Same compatibility origin, same single-letter name, opposite filter. If you understand one you understand the other.
  • TEXT — the function readers reach for when they meant to render a number as text. This is the confusion T generates most: TEXT(42, "0") is "42"; T(42) is "". They are not related and are not alternatives.
  • ISTEXT — the proper type predicate, returning a logical rather than a value. ISTEXT distinguishes empty text from a non-text value; T does not.
  • VALUE and NUMBERVALUE — the text-to-number direction.
  • T is not a Compatibility-category function and is not superseded by anything. Its legacy character is about its origin — cross-program compatibility with older spreadsheet products — not about its status. Microsoft continues to document it as a current Text function.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents