T Function

Returns the text in a value — or empty text if the value isn't text.

Category

Text

Available in

All versions, Microsoft 365

Returns

Text, or empty text

Want to practice T in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

T checks a value: if it's text, you get it back unchanged; if it's a number, date or TRUE/FALSE, you get empty text.

It's mostly kept for compatibility with older spreadsheet programs, but can be handy for keeping only the labels from a mixed column.

Syntax

=T(value) Explain

Arguments

ArgumentRequired?What it does
valueYesThe value to test.

Examples

Example 1 — Keeping only text

Show the labels and blank out the numbers.

B2fx=T(A2)
AB
1ValueText only
2NorthstarNorthstar
3125
4WestWest
=T(A2) Explain

Common mistakes

  • Text numbers count as text. A number stored as text (like an imported "125") is returned as it is.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.