Skip to content

ISTEXT

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()

Information

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
A
B
C
D
1
Entry
Is text?
2
Gloves
TRUE
3
1042
4
5

B2 =ISTEXT(A2) returns TRUE

How ISTEXT works

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.

The argument

value can be a cell, a typed value or any formula result.

  • Text, such as "Gloves": TRUE.
  • Text that looks like a number, such as "1042": TRUE. This is the useful case.
  • Empty text returned by a formula, ="": TRUE. The cell looks empty but holds text.
  • Numbers, dates and times: FALSE.
  • TRUE and FALSE, errors and truly empty cells: FALSE.

Finding numbers stored as 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.

Guarding a calculation

=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.

ISTEXT, ISNUMBER and ISBLANK

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.

A related test: ISNONTEXT

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.

Using ISTEXT with arrays

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.

Arguments

value
The value or cell to check. ISTEXT is TRUE for any text, including "1042" and empty text "". It is FALSE for numbers, dates, logical values, errors and empty cells.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

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
A
B
C
D
1
Entry
Is text?
2
Gloves
TRUE
3
1042
4
5

B2 =ISTEXT(A2) returns TRUE

Example 2

A number stored as text

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
A
B
C
D
1
Amount
Is text?
2
1042
TRUE
3
4
5

B2 =ISTEXT(A2) returns TRUE

Example 3

Convert text numbers to real numbers

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
A
B
C
D
1
Amount
Clean amount
2
1042
1042
3
4
5

B2 =IF(ISTEXT(A2),VALUE(A2),A2) returns 1042

Example 4

Empty text from a formula is still text

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
A
B
C
D
1
Result
Is text?
2
TRUE
3
4
5

B2 =ISTEXT(A2) returns TRUE

Your turn.

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.

C2
A
B
C
D
E
F
1
Order
Amount
Text?
Clean amount
2
O-01
1250
3
O-02
980
4
O-03
2175
5
O-04
640
6
O-05
1890
7
O-06
320
8
9
Entries stored as text

Common mistakes

  • Text that looks like a number is still text. ISTEXT("1042") is TRUE. This is why ISTEXT finds imports that went wrong.
  • A formula that returns "" is text, so ISTEXT is TRUE even though the cell looks empty. A truly empty cell gives FALSE.
  • ISTEXT doesn't tell you whether the text can be converted to a number. VALUE returns #VALUE! for text such as "n/a". Wrap it in IFERROR when needed.
  • Dates typed as text, such as "14-Feb-2025", are text. ISTEXT is TRUE, and date functions will fail until they are converted with DATEVALUE.
  • Leading or trailing spaces make a number-like entry text. TRIM removes them, and VALUE then works.

Questions people ask

How do I find numbers stored as text?

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))`.

How do I convert text to numbers in Excel?

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!.

Why does ISTEXT return TRUE for a blank-looking cell?

The cell contains a formula that returns empty text (`""`), or a space. A truly empty cell returns FALSE.

Is ISTEXT TRUE for a number with a format like currency?

No. Formatting doesn't change the value. A real number with a currency format is still a number and ISTEXT is FALSE.

Learn ISTEXT in a real sheet.

ISTEXT is taught in Logic and text, lesson 6: ISBLANK, ISNUMBER and ISTEXT. Each lesson is a short, graded exercise like the one above.