How to Use the ISTEXT Function in Google Sheets
=ISTEXT(value). It is often paired with IF.
What ISTEXT does
ISTEXT is the counterpart of ISNUMBER: it answers whether a value is text. Use it to find text hiding in a numeric column, or to branch a formula by the type of its input. It is most often paired with IF.
ISTEXT syntax
=ISTEXT(value)
Per Google's help page, it returns TRUE if the value is text or a reference to a cell containing text, and FALSE otherwise. The page adds a detail worth remembering: ISTEXT("") returns TRUE, because an empty string is text, whereas a reference to a blank cell returns FALSE. For truly empty cells, use ISBLANK.
A step-by-step example
Cell A2 holds the word cat and cell A3 holds the number 42.
| A | |
|---|---|
| 1 | Value |
| 2 | cat |
| 3 | 42 |
=ISTEXT(A2)
This returns TRUE. =ISTEXT(A3) returns FALSE, because 42 is a number. The empty string is the surprising case:
=ISTEXT("")
This returns TRUE.
Common mistakes
- Treating a blank cell as text. A reference to a blank cell returns FALSE.
- Forgetting that a number in quotation marks is text.
- Using it to count text cells. See how to count cells with text.
Try it yourself
Use the cells above (A2 and A3). Type your formula into the box, starting with =, then press Check.
Exercise 1: Is it text?
Write a formula that checks whether the value in A2 is text.
Exercise 2: The empty string
Write a formula that tests an empty string (two quotation marks with nothing between them) with ISTEXT.
What to learn next
- ISERROR: check whether a value is an error.
- ISNUMBER: check whether a value is a number.
- ISBLANK: check whether a cell is empty.
Syntax and rules in this guide were checked against Google's ISTEXT help page. See all guides.