ISTEXT
Return TRUE when a value is text rather than a number.
Syntax
ISTEXT(value) | Argument | Required | Description |
|---|---|---|
value | Required | The value to test, usually a cell reference. |
Examples
Every example below was executed against VisiGrid engine 0.55.1 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=ISTEXT("a") | TRUE | |
=ISTEXT(10) | FALSE | |
=ISTEXT(A2) | TRUE | |
=ISTEXT(A1) | FALSE | |
=ISTEXT(A3) | TRUE | Text that looks like a number is still text — the case this function exists for. |
=LEN(A3) | 3 | And it keeps its leading zeros, which a number would not. |
The mirror of ISNUMBER, with one use of its own
Most of the time ISNUMBER answers the question. ISTEXT
earns its place when scanning a column that should be entirely numeric and you
want to find the offenders:
Count them in one cell — given a range, ISTEXT tests each cell, and --
turns the TRUE/FALSE results into 1s and 0s:
=SUMPRODUCT(--ISTEXT(A2:A100))
A non-zero answer means some of the column is text. To find which rows, put
=ISTEXT(A2) in a helper column and filter for TRUE, or let ISTEXT(A2:A100)
spill its answers beside the data.
What counts as text
Text that looks like a number is still text, and this is the distinction the function exists for:
'007 text — LEN is 3, and it keeps its leading zeros
007 the number 7
A leading apostrophe marks a cell as text. ISTEXT reports what the cell
holds, not what it displays.
Excel compatibility
Matches Excel.