ISTEXT Function¶
The ISTEXT function in Excel is used to check whether a value is text. It returns TRUE when the value is a text string and FALSE for numbers, logical values, dates, errors, and blank cells. This function is useful for auditing columns that should hold one data type, for catching numbers that were imported as text, and for guarding text functions against arguments they cannot process.
Key Features of ISTEXT:¶
- Returns
TRUEonly when the value genuinely is a text string. - Returns
FALSEfor numbers, including numbers formatted to look like text, and for logical values, dates, times, and errors. - Returns
TRUEfor an empty string"", which is text of zero length — this is not the same as a blank cell. - Returns
FALSEfor a truly blank cell, whereISBLANKreturnsTRUE. - Applied to a range, it evaluates each cell individually and returns an array of results.
Syntax:¶
- value: The value or expression you want to test. Typically a cell reference or formula result.
How ISTEXT Works:¶
ISTEXTevaluates the provided value or expression.- If the result is a text string — including a zero-length one — it returns
TRUE. - For every other data type — number, logical, date, time, error, or blank — it returns
FALSE.
No type coercion happens. ISTEXT asks what the value is, not what it could be converted to, which is exactly what makes it useful for finding numbers stored as text.
Examples:¶
1. A Text Value:¶
If A1 contains "Hello":
Result:
2. A Number:¶
If A1 contains 42:
Result:
3. A Number Stored as Text:¶
If A1 contains the text "42" rather than the number:
Result:
4. An Empty String:¶
Result:
5. A Blank Cell:¶
If A1 is empty:
Result:
6. A Logical Value:¶
Result:
7. Guarding a Calculation:¶
Result:
8. Counting Text Cells in a Range:¶
Result:
Notes:¶
ISTEXTdistinguishes types, it does not convert them.ISTEXT("42")isTRUEeven though"42"*1evaluates to42.- The empty string is the main point of confusion:
ISTEXT("")isTRUEwhileISTEXT(<empty cell>)isFALSE. A formula returning""therefore produces a cell thatISTEXTcalls text andISBLANKcalls non-blank. - If the argument evaluates to an error,
ISTEXTreturnsFALSErather than propagating the error, soISTEXT(FIND("x",A1))is safe to use directly. ISNONTEXTis the exact negation ofISTEXT— it returnsTRUEfor everythingISTEXTreturnsFALSEfor, blank cells included.TYPEreturns2for exactly the values thatISTEXTreturnsTRUEfor, soISTEXT(A1)andTYPE(A1)=2are equivalent.ISTEXTis part of the IS family of information functions (ISBLANK,ISERR,ISERROR,ISEVEN,ISLOGICAL,ISNA,ISNONTEXT,ISNUMBER,ISODD,ISTEXT, etc.).
Applications:¶
- Import Auditing: Find numeric columns where some values arrived as text and will not sum correctly.
- Data Cleaning: Flag cells needing conversion before a
VLOOKUPfails on a type mismatch. - Input Validation: Confirm that a name or code field really holds text before concatenating it.
- Type Auditing: Combine with
ISNUMBERandISLOGICALto classify every cell in a mixed-type column. - Conditional Formatting: Highlight cells whose type does not match the expected schema.
Related Functions:¶
- ISNONTEXT: Returns TRUE if the value is anything other than text — the exact negation.
- ISNUMBER: Returns TRUE if the value is a number.
- ISBLANK: Returns TRUE if the cell is empty.
- ISLOGICAL: Returns TRUE if the value is a logical value.
- TYPE: Returns a numeric code indicating the data type of a value —
2for text. - N: Converts a value to a number — text becomes
0.
Tip: A column that will not sum is almost always a
ISTEXTproblem. Drop=SUMPRODUCT(--ISTEXT(A1:A1000))next to it: if the count is anything but zero, some of those "numbers" are text and need converting before any arithmetic will see them.