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
| Argument | Required? | What it does |
|---|---|---|
| value | Yes | The value to test. |
Examples
Example 1 — Keeping only text
Show the labels and blank out the numbers.
B2fx=T(A2)
| A | B | |
|---|---|---|
| 1 | Value | Text only |
| 2 | Northstar | Northstar |
| 3 | 125 | |
| 4 | West | West |
=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
- Related functions: ISTEXT, N, VALUETOTEXT.

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.