Summary

The Excel T function returns text when given a text value and an empty string ("") for numbers, dates, and the logical values TRUE and FALSE. You can use the T function to remove values that are not text.

Purpose
Filter text values only
Return value
Value as text when text
Syntax
=T(value)
  • value - The value to return as text.
Microsoft docs

Using the T function

The Excel T function converts numbers, dates, and the logical values TRUE and FALSE into empty strings. Text values and errors are not converted and pass through unaffected. You can use the T function to remove values that are not text.

The T function takes one argument, value, which can be a cell reference, a formula result, or a hardcoded value.

Examples

The T function returns text when given a text value and an empty string ("") for numbers, dates, and the logical values TRUE and FALSE. For example:

=T("apple") // returns "apple"
=T("NASA") // returns "NASA"
=T(100) // returns ""
=T(FALSE) // returns ""

In most cases, the T function is unnecessary, because Excel automatically converts values when needed. The T function is provided for compatibility with other spreadsheet programs.

Errors are not affected by the T function:

=T(3/0) // returns #DIV/0!
=T("#N/A") // returns #N/A

Notes

  1. The T function removes numeric values. The N function removes text values.

Support Exceljet

Many websites (including Exceljet) have lost over half their traffic in the past year because of the crushing impact of AI on web searches. Exceljet is still at it, publishing free content each week. If you find Exceljet helpful, you can support the site and go ad-free with the Exceljet Lifetime Pass. One payment, no subscription, and ads are gone forever. Plus, you get our Excel Shortcuts video course as a thank you.

Get the Lifetime Pass

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.