T function
Returns the value if it is text, or an empty string if it is a number, date, logical value or anything else.
Available in All versions of Excel, including Microsoft 365, Excel for Mac and Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
T(value)| Argument | What it means | |
|---|---|---|
value | Required | The value or cell to test. |
Returns: The text itself, or "" (empty text) for any non-text value.
How T works
T is a tiny filter: if the value is text it passes through unchanged; if it is anything else - a number, a date, TRUE/FALSE - you get an empty string instead. Error values are not filtered; they pass through as errors.
Most workbooks never need T, because Excel converts values automatically. It exists mainly for compatibility with other spreadsheet programs and is occasionally useful when you want to show a label from a column that mixes text and numbers but ignore the numbers, or to clean up a column before joining it with other text. Its partner N does the opposite job for numbers. To test for text rather than filter it, use ISTEXT.
Examples
1Text passes through
| A | B | C | |
|---|---|---|---|
| 1 | Item | Qty | |
| 2 | Pens | 42 | Pens |
Result: Pens
A2 holds text, so T returns it unchanged.
2Numbers are dropped
| A | B | C | |
|---|---|---|---|
| 1 | Item | Qty | |
| 2 | Pens | 42 |
Result:
B2 holds the number 42, so T returns empty text and the cell looks blank.
3Labels only from a mixed column
| A | B | |
|---|---|---|
| 1 | Note | |
| 2 | Back-ordered | |
| 3 | 15 | |
| 4 | Discontinued |
Result:
Filled down column B, T shows the text notes and blanks out the stray number 15 in A3.
Tips
- T does not convert numbers to text; use TEXT or
A2&""for that. - Use ISTEXT when you need TRUE/FALSE instead of the value itself.
Google Sheets
T also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
T in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.