Back to functions
Text2026-06-130 related articles

T Function in Excel

Return text values as text and convert non-text values to an empty string.

Syntax

T(value)

Arguments

value

Required

The value you want to test.

What it returns

Returns the original text value or an empty string for non-text input.

What T does

T returns the supplied value if it is text, and returns an empty text string if it is not. It is mostly a compatibility function, but it can still be useful when you need a formula to pass through text only.

Practical examples

Keep text values and ignore numbers

=T(A2)

If A2 contains text, T returns that text. If A2 contains a number, T returns an empty string.

Pull only the text part of a mixed range

=T(A4)

This is a simple way to strip out logical or numeric values when a downstream formula expects text only.

Common mistakes and notes

Empty text is still a text result

For non-text input, T returns "", not a blank cell and not zero.

T is mostly for compatibility

Microsoft notes that Excel already converts values automatically in many situations, so T is not needed in most modern formulas.

Related functions

Official documentation