What is the ISNONTEXT function?
=ISNONTEXT(value)ISNONTEXT returns TRUE if a value is not 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.
ISNONTEXT checks that an entry field holds nothing but text. Because blanks are TRUE, it catches in one test the rows where a name field was left empty or got a number by mistake.
Arguments
- value
- The value or cell to test.
ISNONTEXT examples
Example 1. A number
=ISNONTEXT(A3)A number, so TRUE.
Example 2. A blank cell
=ISNONTEXT(A4)A blank is not text either, so TRUE.
Example 3. Result for each kind of value
=ISNONTEXT(A2)Always the opposite of ISTEXT.
Value in column A =ISNONTEXT(A2) Apple FALSE 120 TRUE (blank) TRUE TRUE TRUE #N/A TRUE #DIV/0! TRUE "120" (text) FALSE Example 4. Missing names
=IF(ISNONTEXT(B2), "Check", "")Shows "Check" when the name in B2 is blank, a number or an error.
Common mistakes
Treating it like ISNUMBER
Blanks, logical values and errors are TRUE too, so it differs from ISNUMBER.
Text that looks like a number
According to Microsoft, IS functions test the value without converting it, so "120" stored as text is text, not a number.
Errors are TRUE too
An error value such as #N/A is not text, so the result is TRUE. Test with ISERROR first if errors need separate handling.
FAQ
- How does it relate to ISTEXT?
- It always gives the opposite result.
- When is it useful?
- To flag every entry that was not typed as text, blanks included.
- Can data validation allow only text?
- Yes. A Custom rule of =ISTEXT(B2) blocks anything that is not text.