Formualizer Docs

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

ArgumentTypeRequiredDefault
valueanyRequired—

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?.

FAQ

Does T hide non-text values?

Yes. Non-text inputs become an empty string, but errors are still propagated.

Implementation

Engine source

On this page