Text

T Formula

T returns the text in a cell if the value is text, or an empty string if it is anything else (number, logical, error). It is a type-checking function useful for ensuring a value is text before further string operations, or for stripping non-text values from mixed data.

Syntax

T(value)
ParameterDescription
value Parameter of the T function.
Try T in Viztab — free, no signup

Examples

Extract only text values

Formula
=T(A1)
If A1="Hello", returns "Hello". If A1=42 or A1=TRUE, returns "" (empty string).

Safe concatenation

Formula
=T(A1) & T(B1)
Concatenates only the text values from A1 and B1. Numeric or logical values are silently dropped instead of being coerced.

Check data type

Formula
=IF(T(A1)<>"", "Text", "Not text")
Returns "Text" if A1 contains a text value, "Not text" for numbers, booleans, or blanks.

Common Errors

#VALUE!

T itself rarely errors, but if the referenced cell contains an error (like #REF!), that error propagates through T.

Tips

Opposite of N

T extracts text (returns empty for non-text). N extracts numbers (returns 0 for non-numbers). They are complementary type filters.

Useful for cleaning mixed data

When a column has mixed numbers and text, =T(A1) in a helper column isolates just the text entries for further processing.

Mostly replaced by ISTEXT

For just checking if a value is text, ISTEXT(A1) returns TRUE/FALSE and is more readable. T is better when you need the actual text value.

Try T in Viztab

Import your data and use T with 370+ other formulas. No signup required.

Open Viztab

Related Formulas