Example 1
Text versus a number
B2 =ISTEXT(A2)
Result: TRUE
A2 holds the word Gloves, so ISTEXT is TRUE. For A3, the number 1042, it would be FALSE.
B2 =ISTEXT(A2) returns TRUE
Returns TRUE when a value is text, including text that looks like a number. Use it to find numbers stored as text before they break a total or a lookup.
Syntax
=ISTEXT()
Every version of Excel, including Microsoft 365, Excel 2024, 2021, 2019, 2016 and earlier, Excel for the web and the mobile apps.
Try it
Edit the formula in B2 or change the inputs. The sheet recalculates as you type.
B2 =ISTEXT(A2) returns TRUE
ISTEXT returns TRUE if a value is text, and FALSE if it is anything else. It is the counterpart of ISNUMBER, and the quickest way to find numbers that are really text.
value can be a cell, a typed value or any formula result.
="": TRUE. The cell looks empty but holds text.Numbers from imports, copy-paste and some databases often arrive as text. They line up on the left, SUM ignores them and lookups fail: a search for the number 1042 won't find the text "1042". =ISTEXT(B2) is TRUE for those cells. Used with a counter, =SUMPRODUCT(--ISTEXT(B2:B20)) tells you how many entries in the column are text. In a column that should be all numbers, any TRUE is a problem.
To fix them in a formula:
=IF(ISTEXT(B2), VALUE(B2), B2)
VALUE converts text such as "1042" into the number. If the text can't be converted, such as "n/a", VALUE returns #VALUE!, so wrap it in IFERROR when the column may hold other text. For a one-off clean-up, Text to Columns or multiplying the cells by 1 converts them in place.
=IF(ISTEXT(B2), "Check", B2*1.2) stops text in B2 from causing a #VALUE! in the calculation. Text is not the only way a cell can be unsuitable for arithmetic, though. For a general guard, ISNUMBER is safer, because it is FALSE for text, errors and blanks alike.
Every value is exactly one of: number, text, logical value, error, or empty. ISTEXT, ISNUMBER, ISBLANK and ISERROR each test one of those kinds. Only one of those tests is TRUE for any given value. A formula that returns "" counts as text, so ISTEXT is TRUE for it and ISBLANK is FALSE.
ISNONTEXT is the opposite: TRUE for everything that isn't text, including empty cells. It is rarely needed. NOT(ISTEXT(x)) does the same job.
In Microsoft 365 and Excel 2021 or later, =ISTEXT(B2:B20) returns an array of TRUE and FALSE values, which you can use to filter: =FILTER(A2:B20, ISTEXT(B2:B20)) lists the rows whose amount is text, which is handy for tracking down the entries that need cleaning.
"1042" and empty text "". It is FALSE for numbers, dates, logical values, errors and empty cells.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B2 =ISTEXT(A2)
Result: TRUE
A2 holds the word Gloves, so ISTEXT is TRUE. For A3, the number 1042, it would be FALSE.
B2 =ISTEXT(A2) returns TRUE
Example 2
B2 =ISTEXT(A2)
Result: TRUE
The cell holds the text "1042", not the number 1042. ISTEXT is TRUE, which flags a value that SUM would ignore.
B2 =ISTEXT(A2) returns TRUE
Example 3
B2 =IF(ISTEXT(A2),VALUE(A2),A2)
Result: 1042
ISTEXT is TRUE, so IF returns VALUE(A2), which turns the text into the number 1042. Real numbers pass through unchanged.
B2 =IF(ISTEXT(A2),VALUE(A2),A2) returns 1042
Example 4
B2 =ISTEXT(A2)
Result: TRUE
A2 looks blank but holds a formula that returns empty text, which is text. A truly empty cell would give FALSE.
B2 =ISTEXT(A2) returns TRUE
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In C2, return TRUE when the amount in column B is stored as text. Fill down to C7.
Answer in C2, then it fills down to C7.
ISTEXT("1042") is TRUE. This is why ISTEXT finds imports that went wrong."" is text, so ISTEXT is TRUE even though the cell looks empty. A truly empty cell gives FALSE.#VALUE! for text such as "n/a". Wrap it in IFERROR when needed.Use `=ISTEXT(B2)`, which is TRUE for text including text that looks like a number. To count them in a column, use `=SUMPRODUCT(--ISTEXT(B2:B20))`.
Use `=VALUE(B2)`, multiply by 1 (`=B2*1`), or use Text to Columns on the whole column. Remove stray spaces with TRIM first if VALUE returns #VALUE!.
The cell contains a formula that returns empty text (`""`), or a space. A truly empty cell returns FALSE.
No. Formatting doesn't change the value. A real number with a currency format is still a number and ISTEXT is FALSE.
ISTEXT is taught in Logic and text, lesson 6: ISBLANK, ISNUMBER and ISTEXT. Each lesson is a short, graded exercise like the one above.