FormulaCraft

T

T returns the text value of a cell unchanged if it contains text, and returns an empty string ('') if the cell contains a number, date, logical value, or is blank. It is used to safely coerce mixed-type ranges into text-only values or to test whether a cell holds a text string.

Excel
=T(A2)
Google Sheets
=T(A2)

Verified example

Computed by a real spreadsheet engine on the sample data below.

ValueText Only
Hello=T(A2)
World=T(A3)
Sample=T(A4)
Data=T(A5)

=T(A2)Hello

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1Place a mix of text and numeric values in column A.
  2. 2Enter =T(A2) — if A2 contains text like 'Hello', it returns 'Hello'; if A2 contains 42, it returns an empty string.
  3. 3Use T inside concatenations to safely skip non-text cells without triggering errors.

Need a version for your data?

Try: “Filter out non-text values from a mixed column so only text strings are returned

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: