Excel function

ISTEXTfunction

Checks whether a value is text.

All versions
=ISTEXT(A8)
A
B
C
1
2
3
4
5
6
7
8
9
10

Click a cell in the table to change value. A8 looks like a number but is stored as text, so TRUE. Try breaking it on purpose to see the errors.

Result

TRUE

value
A8You can also click a cell in the table

The cell to test. Click another value in column A.

What is the ISTEXT function?

=ISTEXT(value)

ISTEXT returns TRUE if a value is text. It is most often used inside IF to treat values differently by kind.

Column A of the sheet mixes text, numbers, a blank, a logical value, errors and text that looks like a number; column B says what each is. Column C shows the same formula copied down.

When a SUM refuses to add up after pasting data from another system, the cause is usually numbers stored as text. Put ISTEXT in a helper column and look for TRUE: those are the cells the calculation is skipping.

Arguments

value
The value or cell to test.

ISTEXT examples

  1. Example 1. Check for text

    =ISTEXT(A2)

    "Apple", so TRUE.

  2. Example 2. Text that looks like a number

    =ISTEXT(A8)

    "120" is stored as text, so TRUE. Handy for finding why a calculation fails.

  3. Example 3. Result for each kind of value

    =ISTEXT(A2)

    Only values stored as text are TRUE.

    Value in column A=ISTEXT(A2)
    AppleTRUE
    120FALSE
    (blank)FALSE
    TRUEFALSE
    #N/AFALSE
    #DIV/0!FALSE
    "120" (text)TRUE
  4. Example 4. Count text cells

    =SUMPRODUCT(--ISTEXT(A2:A10))

    In A2:A10 the result is 2: Apple and "120".

Common mistakes

FAQ

The opposite?
Use ISNONTEXT.
How do I convert it to a number?
Use VALUE.
How do I convert many text numbers at once?
Type 1 in a spare cell, copy it, select the range and use Paste Special > Multiply.