T Function

Excel Functions › Text

All Excel versions Text

The Excel T function is a one-letter filter: if the value you give it is text, T returns it unchanged; if it is a number, date, logical value, or error… you get empty text "" instead. It exists mainly for compatibility with other spreadsheet programs and very old workbooks — but it still earns its keep as a quick “text passes, everything else blanks out” gate, and it has one surprising modern cameo inside LAMBDA-era formulas.


Quick answer: to keep A2 only if it’s text:
=T(A2)
=T("Dallas") returns Dallas; =T(1042), =T(TRUE), and =T(6/19/2026) all return empty text "".

Syntax

=T(value)
ArgumentDescription
valueRequiredAny value or cell reference. Text comes back as-is; numbers, dates, logicals, and blanks come back as empty text "".

Available in: every version of Excel and most other spreadsheet programs — which is the point: T survives largely so formulas written elsewhere keep working in Excel. Note: a number stored as text (like "1042" from an import) counts as text and passes through.

What T returns, value by value

One column of mixed values shows the whole behavior — text passes, everything else becomes empty text:

AB
1Value in A=T(A2)
2DallasDallas
31042(empty text)
4TRUE(empty text)
56/19/2026(empty text)
6"1042" stored as text1042  ← text passes through
=T(A2) // fill down the column

Row 6 is the subtle one: a text-stored number passes straight through, which makes T a quick visual filter for “which of these cells are secretly text?” in an imported column.

Try it: interactive T demo

Live demo

Pick a value type and see what T returns for it.

When T still matters

1. Imported-data triage. Drop =T(A2) next to a suspicious column: anything that survives is text. It’s the visual cousin of ISTEXT — ISTEXT answers TRUE/FALSE, T shows you the actual text:

=IF(T(A2)="", "number or other", "text: " & T(A2))

2. Text-only aggregation. Pair T with TEXTJOIN to concatenate only the text entries from a mixed range, skipping numbers automatically:

=TEXTJOIN(", ", TRUE, T(A2:A10)) // numbers become "" and TEXTJOIN ignores them

3. Compatibility. Workbooks migrated from other spreadsheet systems sometimes lean on T heavily; leave those formulas alone — they work fine.

Modern alternative: for new builds, =IF(ISTEXT(A2), A2, "") says the same thing more readably, and FILTER with ISTEXT extracts all text entries from a range in one spill.

Errors & common pitfalls

Pitfall: T is not TEXT. The one-letter T filters (text passes, numbers blank out); the four-letter TEXT converts numbers into formatted text. =T(1042) returns ""; =TEXT(1042,"#,##0") returns 1,042. Mixing them up is the most common T mistake by far.

Pitfall: dates vanish. Dates are numbers in Excel, so =T(A2) on a real date returns "". If you wanted the date as text, that’s TEXT’s job: =TEXT(A2,"mm/dd/yyyy").

Pitfall: errors pass through. T doesn’t catch error values — feed it one and the error propagates. Wrap with IFERROR if the source range can contain errors.

Pitfall: “empty” isn’t empty. T returns empty text (""), not a truly blank cell. COUNTA still counts it, and ISBLANK says FALSE. Test with =T(A2)="" rather than ISBLANK.

Practice workbook

📊
Download the free T practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does the T function actually do?
One test: is the value text? If yes, T returns it unchanged. If it’s a number, date, logical, or blank, T returns empty text "". That’s the entire function.
What's the difference between T and TEXT?
Completely different jobs despite the similar names. T filters values by type and never changes them; TEXT converts numbers and dates into formatted text strings. =T(1042) gives ""; =TEXT(1042,"#,##0") gives 1,042.
Is the T function obsolete?
Mostly - it exists for compatibility with other spreadsheet programs and legacy workbooks. =IF(ISTEXT(A2),A2,"") expresses the same logic more readably. But it's tiny, harmless, and still handy for quick text-or-not triage on imported columns.
Why does T return text for some numbers and not others?
Those "some numbers" are stored as text - usually from a CSV import. Real numbers blank out; text-stored numbers pass through. That asymmetry makes =T(A2) a quick detector for the numbers-stored-as-text problem (which VALUE then fixes).
Does T work on whole ranges?
In Excel 365 / 2021, yes — =T(A2:A10) spills a result per cell. Combined with TEXTJOIN it concatenates only the text entries of a mixed range: =TEXTJOIN(", ", TRUE, T(A2:A10)).

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: TEXT · VALUE · TEXTJOIN · IF · IFERROR