T
Returns text when input is text, otherwise returns empty text.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=T(value)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
value | any | Required | — |
Return type
Text
Remarks
- Text values pass through unchanged.
- Errors propagate unchanged.
- Numbers, booleans, and blanks return an empty string.
Examples
Return a text value unchanged.
Formula =T("sample")
Expected result sample
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Return an empty string for a number.
Formula =T(123)
Expected result ""
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Preserve an already empty string.
Formula =T("")
Expected result ""
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Propagate the error instead of returning empty text.
Formula =T(1/0)
Expected result #DIV/0!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Text passthrough
Formula =T("report")
Expected result report
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Number becomes empty text
Formula =T(99)
Expected result ""
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Does T hide non-text values?
Yes. Non-text inputs become an empty string, but errors are still propagated.