
Returns the value if it is text, or an empty string if it is not.
The Excel T function returns the value if it is text. If the value is not text, T returns an empty string. For example, =T("hello") returns "hello", while =T(100) returns "".
T is a small compatibility function and is not needed very often, because Excel usually converts values automatically when needed. Still, it can be useful when you want a formula to keep text and quietly ignore non-text values.
Passes text through unchanged and returns empty text for non-text values.
Returns the original text if the input is text, otherwise returns "".
=T(value)
T takes one argument: the value you want to test. The function checks whether that value is text and either returns it or returns empty text.
T is related to a few other conversion or type-checking functions, but it has a very specific job: keep text, ignore the rest.
| Function | Main Behavior | Use When |
|---|---|---|
T |
Returns text or "" | You want a text-only result |
N |
Returns numbers or numeric equivalents | You want a number-oriented conversion |
ISTEXT |
Returns TRUE or FALSE | You want to test whether a value is text |
TEXT |
Formats a value as text | You want to convert numbers or dates into formatted text |
T is most useful when a formula should include text if it exists, but should add nothing if the value is numeric or another type. That is why it sometimes appears inside concatenation formulas.
It is also important to know what T does not do. It does not convert numbers into text. If you pass a number into T, the result is empty text, not the number as a string. If you need a real conversion to text, use TEXT or another text-building approach.
If the input is text, T simply returns that same text. This is the pass-through case.
=T(A1) // If A1 = "Excel", returns "Excel"
=T("hello") // "hello"
In cell F1, use T on A1 ("Excel") to confirm that a text value is returned unchanged.
If the input is a number, T returns empty text. This is why T can act as a quiet text-only filter in a larger formula.
=T(B2) // If B2 = 100, returns ""
=T(3.14) // ""
In cell F2, use T on B2 (which contains the number 100). Expected result: "" (empty).
In a mixed column, T returns the note if the value is text and returns nothing if the cell contains a non-text value. That can make a helper column cleaner when only text notes matter.
=T(C1)
// "Order Pending" -> "Order Pending"
In cell F3, use T on C1 ("Order Pending") to return the text note unchanged.
T can be used inside a text formula to keep text values while dropping non-text ones. If the referenced cell is not text, the label remains but no extra value is added.
="Status: "&T(A1)
// If A1 = "Active" -> "Status: Active"
// If A1 = 5 -> "Status: "
In cell F4, use T inside a concatenation to safely combine "Status: " with A1.
T is mostly a compatibility function, so it is normal if you rarely use it in everyday worksheets. It is helpful mainly when you need a quiet, text-only filter rather than a full type test or format conversion.
T returns text and ignores non-text values.=T(value).Tell your friends about this post