ISTEXT returns TRUE if a value is text and FALSE for numbers, dates, blanks, errors, or logical values. Use it to flag text entries, validate data, or build conditional formulas that react to text.
=ISTEXT(value)What does ISTEXT do?
ISTEXT is one of Excel's information functions. It looks at a value and tells you whether that value is text. If the value is text, ISTEXT returns TRUE; if it is a number, a date, a blank cell, an error, or a logical value such as TRUE or FALSE, it returns FALSE. The function takes one argument, the value you want to test, and it never changes the value itself.
Why does this matter? Excel treats text and numbers differently. Text sorts differently, cannot be summed, and often signals a data-entry problem such as a number stored as text. ISTEXT lets you check a cell before you act on it, so your formulas can handle mixed data gracefully. It is also useful for cleaning imported data, where values often arrive with the wrong type.
A common situation: you import a customer list and some phone numbers or postal codes arrive as text while others are numbers. You can use ISTEXT to flag the text ones, then decide whether to convert them. Or you might want a formula that only calculates a discount when a promo code cell actually contains text, not a blank or an error.
When to use ISTEXT
- Flag cells that contain text instead of numbers in a data-validation check.
- Detect numbers stored as text before summing a column.
- Return a friendly message only when a comment or note cell contains text.
- Separate text entries from numeric entries when cleaning imported data.
- Build conditional formulas that should run only for text values.
- Check whether a lookup result is text before applying text functions.
ISTEXT syntax
=ISTEXT(value)| Argument | Required? | What to enter |
|---|---|---|
value | Required | The value, cell reference, or expression you want to test. It can be a cell such as A2, a literal such as "Hello", or a formula result. If the value is text, ISTEXT returns TRUE; otherwise FALSE. |
What it returns: A logical value: TRUE if the tested value is text, FALSE if it is a number, date, blank, error, or logical value.
ISTEXT examples
1 Example 1: Basic text check
This example tests whether a single cell contains text. The formula =ISTEXT(B2) looks at cell B2, which holds the word "North". Because that value is text, the formula returns TRUE. If B2 held a number, it would return FALSE.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Item | Value | |||
| 2 | Region | North | TRUE | ||
| 3 | Sales | 1200 | |||
| 4 | Date | 2024-01-15 | |||
| 5 | Code | A-100 | |||
| 6 |
2 Example 2: Text vs number in a sales column
Here we check whether a sales amount is stored as text. The formula =ISTEXT(B2) tests cell B2, which contains the number 1200. Since 1200 is a number, ISTEXT returns FALSE. This is useful for spotting values that look like numbers but are actually text.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Product | Sales | |||
| 2 | Widget | 1200 | FALSE | ||
| 3 | Gadget | 950 | |||
| 4 | Doohickey | 430 | |||
| 5 | Thingamajig | 1,200 | |||
| 6 |
3 Example 3: Flag text entries with IF
This example combines ISTEXT with IF to produce a readable label. The formula =IF(ISTEXT(B2),"Text","Not text") first checks B2 with ISTEXT. If B2 is text, the formula returns "Text"; otherwise it returns "Not text". Because B2 contains "North", the result is "Text".
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Entry | |||
| 2 | North | North | Text | ||
| 3 | South | 450 | |||
| 4 | East | East | |||
| 5 | West | 300 | |||
| 6 |
4 Example 4: Check a promo code cell
Suppose you only want to apply a discount when a promo code cell actually contains text. The formula =IF(ISTEXT(B2),"Apply discount","No discount") tests B2. Since B2 contains "SAVE10" (text), the formula returns "Apply discount". If B2 were blank or a number, it would return "No discount".
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Customer | Promo Code | |||
| 2 | Acme | SAVE10 | Apply discount | ||
| 3 | Beta | ||||
| 4 | Gamma | 123 | |||
| 5 | Delta | FREESHIP | |||
| 6 |
5 Example 5: Validate phone numbers stored as text
Phone numbers should be text because they often start with 0 or contain symbols. The formula =IF(ISTEXT(B2),"OK","Convert to text") checks B2. Because B2 contains "020 7946 0958" as text, it returns "OK". If a phone number were stored as a number, it would return "Convert to text".
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Name | Phone | |||
| 2 | Alice | 020 7946 0958 | OK | ||
| 3 | Bob | 2079460958 | |||
| 4 | Carol | 020 7946 0959 | |||
| 5 | David | 2079460960 | |||
| 6 |
Common ISTEXT errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | Rare, but can occur if the argument is an invalid expression that cannot be evaluated. | Check that the argument is a valid cell reference, literal, or formula. For example, ensure you did not type =ISTEXT() with no argument. |
| #NAME? | The function name is misspelled, such as =ISTXT(A2). | Type ISTEXT exactly. Excel will suggest the correct function as you type. |
| Wrong result (FALSE for text) | The cell contains a number stored as text but with leading/trailing spaces, or the value is actually a number formatted to look like text. | Use =ISTEXT(TRIM(A2)) to ignore extra spaces, or check the cell's actual content in the formula bar. |
| Wrong result (TRUE for blank) | A cell that looks blank may contain an empty string returned by a formula, such as ="". | ISTEXT treats an empty string as text. To test for truly blank cells, use ISBLANK instead. |
Tips for using ISTEXT
- Use ISTEXT together with IF to create friendly labels like "Text" or "Number".
- Remember that dates are numbers in Excel, so ISTEXT returns FALSE for a real date.
- To catch numbers stored as text, combine ISTEXT with ISNUMBER and a conversion check.
- ISTEXT returns FALSE for error values; use ISERROR first if you need to handle errors.
- When checking imported data, apply ISTEXT to a helper column to quickly filter text entries.
- Combine with TRIM to avoid false negatives caused by extra spaces.
Frequently asked questions
Does ISTEXT return TRUE for empty cells?
No. A truly empty cell returns FALSE. However, a cell containing an empty string (for example, from a formula like ="") is considered text and returns TRUE.
Is a date considered text by ISTEXT?
No. In Excel, dates are stored as numbers, so ISTEXT returns FALSE for a valid date. If a date is stored as text (for example, "2024-01-15" entered as text), ISTEXT returns TRUE.
Can ISTEXT check multiple cells at once?
ISTEXT works on a single value. To check a range, you can use it inside functions like SUMPRODUCT or array formulas, but it will return a single TRUE/FALSE per cell.
What is the difference between ISTEXT and ISNUMBER?
ISTEXT returns TRUE for text values, while ISNUMBER returns TRUE for numeric values. They are opposites for most values, but both return FALSE for blanks and errors.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. ISTEXT reference