Excel T Function: Return Text Only (Syntax, Examples, Tips)

Part of the free Module 5: Excel Formulas and Functions · Function 83 of 105 · Full Excel course

The Excel T function returns its argument if the argument is text, and an empty string if it is a number, a date, a logical value, an error or a blank cell. It is a type filter: T lets text through and blocks everything else. The function exists mainly for compatibility with other spreadsheet programs, but it is still useful for building text-only outputs from mixed columns.

Syntax

=T(value)

Arguments

Argument Required / Optional Meaning
value Required The value or cell reference to test. Text is returned unchanged; anything else returns an empty string (“”).

How the T function works

T checks the data type of its argument. If the type is text, including a number stored as text such as “123”, the text is returned exactly as it is. If the type is numeric, logical or an error, T returns “”. A blank cell also returns “”. T does not convert anything; it never turns a number into text, which is what separates it from TEXT. The related N function does the opposite job: it returns numbers and converts text to 0.

Step-by-step example

  1. Type Excel in A2, 123 in A3, TRUE in A4 and leave A5 blank.
  2. In B2 enter =T(A2) and fill down to B5.
  3. B2 shows Excel; B3, B4 and B5 all show an empty string because their inputs are not text.
  4. Type '123 (with a leading apostrophe) in A6 and copy the formula. B6 returns 123, confirming that a number stored as text is treated as text.

Practical use cases

1. Keep only the text entries from a mixed column

=T(A2)

Filled down, this leaves comments and labels in place while numeric codes disappear, ready for TEXTJOIN.

2. Join text values and ignore numbers

=TEXTJOIN(", ",TRUE,T(A2),T(A3),T(A4))

Any numeric cell becomes an empty string, and TEXTJOIN with ignore_empty set to TRUE skips it.

3. Safe label concatenation

="Note: "&T(B2)

If B2 accidentally holds a number, the label stays clean instead of showing “Note: 45”.

4. Detect text without ISTEXT

=T(A2)<>""

Returns TRUE for non-empty text and FALSE for numbers, logicals and blanks. ISTEXT is clearer, but this pattern appears in older workbooks.

Common mistakes and tips

  • Expecting T to convert numbers to text: it does not. Use TEXT(A2,”0″) or A2&”” for conversion.
  • Empty strings count as text: a formula that returns “” passes through T unchanged, so T cannot distinguish blank cells from empty text.
  • Dates and times: they are numbers, so T returns “”. Format them with TEXT if you want them in the output.
  • Errors: T of an error value returns “”, not the error, so it can quietly hide problems. Check the source with ISERROR if that matters.
  • In most new workbooks, ISTEXT with IF is easier for colleagues to read than T.

T compared with TEXT, N and ISTEXT

Four functions with similar names cause frequent confusion. T filters: it returns text and blanks everything else. TEXT converts: it takes a number and returns a formatted text string such as “1,234.50” or “04-Sep-2026”. N is the numeric mirror of T: it returns numbers unchanged, converts TRUE to 1 and FALSE to 0, turns dates into their serial numbers and returns 0 for text. ISTEXT tests: it returns TRUE or FALSE without returning the value itself. When you need the text value for further use, choose T; when you need a yes-or-no answer, choose ISTEXT; when you need a number to become text, choose TEXT. The T and N pair is the fastest way to split a mixed column into a text column and a number column with two simple formulas.

Related functions

  • TEXT: converts a number or date to formatted text.
  • N: the numeric counterpart that returns numbers and 0 for text.
  • ISTEXT: returns TRUE when a value is text.
  • TEXTJOIN: joins the text values that T lets through.
  • See all lessons in the Excel Formulas course.

Frequently asked questions

What does the T function do in Excel?

It returns the argument when the argument is text and an empty string when it is a number, date, logical value, error or blank cell.

What is the difference between T and TEXT?

T filters values by type and never converts. TEXT converts a number into a text string using a format you specify.

Does T return dates?

No. Dates are stored as numbers, so T returns an empty string for them. Use TEXT(A2,”dd-mm-yyyy”) to include a date as text.

Need a ready-made template? Browse 7,000+ Excel, Power BI and Google Sheets templates at NextGenTemplates.com.