ISNUMBER & ISTEXT: Validate Data Types & Build Error-Free Formulas

ISNUMBER AND ISTEXT Formula in Excel Blogpost Feature Image
Learn how to use ISNUMBER and ISTEXT in Excel to validate data types, detect numbers stored as text, build safe calculations, and apply data validation rules.

Numbers stored as text silently break calculations. Similarly, text stored where numbers belong causes VLOOKUP to fail with no clear error message. Before performing any calculation on uncertain data, therefore, it pays to confirm what type of value a cell actually holds.

The ISNUMBER function returns TRUE when a cell contains a number, date, or time. By contrast, the ISTEXT function returns TRUE when a cell holds a text string.

Together, these two functions form the foundation of reliable data validation in Excel. They are also the building blocks for the contains-text pattern, safe arithmetic guards, and Data Validation rules covered in this guide.

Availability: ISNUMBER and ISTEXT work in every Excel version from Excel 2000 onwards, including Microsoft 365, Excel 2024, 2021, 2019, and 2016.

What Is the IS Function Family?

ISNUMBER and ISTEXT belong to a broader group called the IS functions. Each member of the family tests for one specific data type or condition and returns either TRUE or FALSE.

Knowing which function to reach for depends on what you want to check. The table below lists all six members and their typical use cases.

FunctionReturns TRUE when the value is...Useful for
ISNUMBERA number, date, or time (stored as a number)Validating numeric input, checking formula results
ISTEXTAny text string (including numbers stored as text)Detecting text fields, flagging mistyped numbers
ISBLANKAn empty cell (no value, no formula)Checking for missing data
ISERRORAny error value (#N/A, #VALUE!, #DIV/0!, etc.)Catching formula errors before they propagate
ISLOGICALA logical value (TRUE or FALSE)Detecting boolean results
ISNONTEXTAnything that is NOT text (numbers, blanks, errors)Opposite of ISTEXT — useful in reverse checks

What Is the Syntax for ISNUMBER and ISTEXT?

Both functions take a single argument and return TRUE or FALSE. No other configuration is needed.

=ISNUMBER(value) → TRUE if value is a number, date, or time =ISTEXT (value) → TRUE if value is any text string
ArgumentWhat it does
value The value to test. Use a cell reference for most cases. You can also pass a direct value, a formula result, or any expression. The IS functions do not convert their input — they evaluate the actual data type as stored by Excel.
IS functions do not convert values: Most Excel functions treat "123" (text) and 123 (number) as equivalent. IS functions do not. ISNUMBER("123") returns FALSE because "123" is a text string, even though it looks like a number. This exact-type behaviour is precisely what makes them useful for data auditing.

How Do ISNUMBER and ISTEXT Respond to Different Values?

Several edge cases catch users off guard. For example, dates and times look like text but are actually stored as numbers internally. Booleans (TRUE/FALSE), by contrast, are logical values — neither numbers nor text.

Additionally, any number entered with a leading apostrophe is stored as text, even though it appears numeric on screen. The table below shows exactly what each function returns for the most common value types.

Cell containsISNUMBERISTEXTNotes
42 (number)TRUEFALSEPlain integer
3.14 (decimal)TRUEFALSEPlain decimal
01-Apr-2026 (date)TRUEFALSEDates are stored as numbers in Excel
09:30 (time)TRUEFALSETimes are also stored as numbers (fractions of a day)
"London" (text)FALSETRUEPlain text string
'123 (number-as-text)FALSETRUEApostrophe prefix forces text storage
TRUE (boolean)FALSEFALSELogical values are neither numbers nor text
#VALUE! (error)FALSEFALSEErrors are their own category — use ISERROR
(blank cell)FALSEFALSEEmpty cells return FALSE for both — use ISBLANK

Example 1: Audit a Column for Mixed Data Types

Imported data from a CSV or database often mixes genuine numbers with text strings in the same column. Consequently, SUM, sorting, and filtering all behave differently for the two types. Running ISNUMBER and ISTEXT across the column therefore instantly reveals which rows need fixing — without any manual scrolling.

1
Flag every cell in a mixed column as Number, Text, or Other
A — Value
ISNUMBER
ISTEXT
Type label
Needs fix?
1250
TRUE
FALSE
Number
No
'1250 (text)
FALSE
TRUE
Text
Yes ✕
01-Apr-2026
TRUE
FALSE
Number
No (date = number)
(blank)
FALSE
FALSE
Other
Yes ✕
Label each cell as Number, Text, or Other: =IF(=ISNUMBER(A2), "Number", IF(=ISTEXT(A2), "Text", "Other")) Flag rows where a number column holds text — TRUE = needs fixing: =ISTEXT(A2) Count how many cells in A2:A100 contain text instead of numbers: =SUMPRODUCT(--ISTEXT(A2:A100)) Count genuine numbers (excludes numbers stored as text): =SUMPRODUCT(--=ISNUMBER(A2:A100))
The SUMPRODUCT approach counts across an entire range without pressing Ctrl+Shift+Enter. Use it to get a quick audit score: if text count is 0, the column is clean. Any count above 0 reveals rows that need repair.

Example 2: Build Safe Calculation Formulas

Arithmetic on a cell that holds text throws a #VALUE! error. Fortunately, ISNUMBER lets you test first and calculate only when the value is genuinely numeric. As a result, errors stop cascading through the worksheet and users receive a clear, readable message instead of a raw error code.

2
Multiply a value safely — show a warning instead of a #VALUE! error
A — Input
B — Without check
C — With ISNUMBER
D — With range check
250
500
500
✓ Valid
"two fifty"
#VALUE!
Enter a number
Enter a number
-50
-100
-100
Must be positive
Guard arithmetic with ISNUMBER before calculating: =IF(=ISNUMBER(A2), A2 * 2, "Enter a number") Range check AND type check — number AND positive AND within limit: =IF(NOT(=ISNUMBER(A2)), "Enter a number", IF(A2 <= 0, "Must be positive", IF(A2 > 1000, "Exceeds limit", A2 * 2))) Use AND for a compact version — number AND in range: =IF(AND(=ISNUMBER(A2), A2>0, A2<=1000), A2 * 2, "Invalid input")

Example 3: The Contains-Text Pattern — ISNUMBER with SEARCH

ISNUMBER is widely used to check whether a cell contains a specific word or phrase. The trick is to nest SEARCH inside ISNUMBER. Specifically, SEARCH returns a position number when the text is found and returns #VALUE! when it is not. ISNUMBER then converts these two outcomes into TRUE and FALSE, giving you a clean contains-check with no IFERROR wrapper needed.

3
Check whether a cell contains a keyword — the ISNUMBER + SEARCH pattern
A — Note
Contains "urgent"?
Label
FIND (case-exact)
URGENT: review by Fri
TRUE
Priority
FALSE (wrong case)
Please send invoice
FALSE
Normal
FALSE
Contains check — case-insensitive (SEARCH ignores case): SEARCH returns a position number if found → ISNUMBER → TRUE SEARCH returns #VALUE! if not found → ISNUMBER → FALSE =ISNUMBER(SEARCH("urgent", A2)) Case-sensitive version — FIND distinguishes "URGENT" from "urgent": =ISNUMBER(FIND("URGENT", A2)) Label rows based on keyword detection: =IF(=ISNUMBER(SEARCH("urgent", A2)), "Priority", "Normal") Count all cells in A2:A100 containing "urgent" (case-insensitive): =SUMPRODUCT(--=ISNUMBER(SEARCH("urgent", A2:A100))) Multiple keywords — TRUE if ANY of the keywords are found: =SUMPRODUCT(--=ISNUMBER(SEARCH( {"urgent","priority","ASAP"}, A2))) > 0
ISNUMBER(SEARCH(...)) replaces IFERROR: You do not need IFERROR here. ISNUMBER already returns FALSE for #VALUE! errors — so the formula is shorter and cleaner. By contrast, IF(ISERROR(SEARCH(...)), FALSE, TRUE) does the same job with more characters.

Example 4: Detect Numbers Stored as Text

A number stored as text shows a small green triangle in the top-left corner of the cell. However, that indicator can be disabled. ISTEXT therefore gives you a programmatic check that works regardless of the visual indicator. Furthermore, combining ISTEXT with VALUE lets you convert and validate in a single formula.

Why Numbers-as-Text Cause Problems

When a number is stored as text, SUM ignores it and AVERAGE skips it entirely. VLOOKUP, furthermore, may fail to match it even when the value looks correct. Consequently, totals appear too low and lookups return #N/A — with no obvious clue as to why.

4
Identify numbers stored as text and convert them safely
ISTEXT returns TRUE for numbers stored as text. ISNUMBER returns FALSE for the same value. Detect: cell A2 contains '1250 (number-as-text): =ISTEXT(A2) → TRUE (it IS text) =ISNUMBER(A2) → FALSE (it is NOT a number) Classify more precisely — is the text convertible to a number? =IF( ISTEXT(A2), IF(=ISNUMBER(VALUE(A2)), "Number as text", "Pure text"), IF(=ISNUMBER(A2), "Genuine number", "Other") ) Safe convert — only apply VALUE when the cell holds text that looks numeric: =IF(ISTEXT(A2), IFERROR(VALUE(A2), "Cannot convert"), A2) Count rows where a "number" column holds text instead of a real number: =SUMPRODUCT(--ISTEXT(A2:A100)) - SUMPRODUCT(--=ISNUMBER(A2:A100))

Example 5: Conditional Formatting to Highlight Data Type Issues

Conditional formatting rules accept ISNUMBER and ISTEXT directly as formula conditions. This turns data type validation into a visual check — every cell that fails the type test lights up automatically. As a result, the entire column becomes self-auditing without any helper column.

5
Highlight text cells in a number column — and number cells in a text column
Conditional formatting rule — apply to column A. Highlights any cell that is NOT a number (i.e. wrong data type in a number column): =NOT(=ISNUMBER($A1)) Highlights text cells in a column that should contain only text: Apply to the text column; flags anything that is not text. =NOT(=ISTEXT($B1)) Highlight cells that contain numbers stored as text (wrong type AND convertible): Apply to a number column — red if text, but the text looks like a number. =AND( =ISTEXT($A1), =ISNUMBER(IFERROR(VALUE($A1), "")) ) Returns TRUE only when the cell holds a number disguised as text
Lock the column reference, not the row: In conditional formatting rules, use a mixed reference like $A1 — dollar on the column, no dollar on the row. This allows the rule to check each row independently as it applies down the range.

Example 6: Data Validation Rules with ISNUMBER and ISTEXT

Data Validation in Excel accepts custom formulas that include ISNUMBER and ISTEXT. This approach prevents wrong data types from being entered in the first place, rather than detecting the problem afterward. For example, you can restrict a "Customer Name" column to text only, or limit a "Quantity" column to numbers only.

6
Restrict a column to numbers only or text only using Data Validation
Data Validation → Custom formula. Allow only numbers in column A (rejects text, blanks, errors): =ISNUMBER(A1) Allow only text in column B (rejects numbers, blanks, booleans): =ISTEXT(B1) Allow only positive numbers in column C: =AND(=ISNUMBER(C1), C1 > 0) Allow only text entries that contain a specific prefix — "@" for emails: ISNUMBER(SEARCH("@",A1)) returns TRUE only when "@" is present. Used in Data Validation, it rejects any entry without "@". =AND(=ISTEXT(A1), =ISNUMBER(SEARCH("@", A1))) Allow either numbers OR text but NOT blanks (dual-type columns): Returns TRUE as long as the cell is not blank. =OR(=ISNUMBER(A1), =ISTEXT(A1))
To apply: select the column, go to Data → Data Validation → Allow: Custom, and enter the formula. Add an error message on the Error Alert tab so users understand what the rule expects. The formula references the first cell of the selected range — Data Validation automatically adjusts it for each row.

How to Fix Common Surprises with ISNUMBER and ISTEXT

ISNUMBER returns TRUE for dates and times

This is correct behaviour, not an error. Excel stores every date as a serial integer and every time as a decimal fraction. Both are therefore numbers, and ISNUMBER correctly returns TRUE for them. If you need to exclude dates from a number check, additionally test the cell format using the CELL function.

ISNUMBER("123") returns FALSE

IS functions never convert their input. "123" in double quotes is always a text string — so ISNUMBER returns FALSE. In contrast, ISNUMBER(123) returns TRUE because 123 without quotes is a genuine number. To check whether a text string represents a valid number, wrap VALUE in ISNUMBER: =ISNUMBER(IFERROR(VALUE(A2),"")).

ISTEXT returns FALSE for empty cells

Blank cells hold no value at all, so both functions return FALSE. To include blanks in a text check — for instance, treating blanks as acceptable entries — combine ISTEXT with ISBLANK: =OR(ISTEXT(A2), ISBLANK(A2)).

TRUE and FALSE are not numbers: Logical values (TRUE and FALSE) return FALSE from both ISNUMBER and ISTEXT. They belong to the "logical" category. However, in arithmetic, Excel converts TRUE to 1 and FALSE to 0. To test for a logical value specifically, use =ISLOGICAL(A2).

Frequently Asked Questions

  • What does ISNUMBER return for dates in Excel?+
    ISNUMBER returns TRUE for dates. Excel stores every date as a serial integer — for example, 1-Jan-2026 is stored as 46023 — and every time as a decimal fraction. Because both are numbers internally, ISNUMBER correctly returns TRUE for them. To check specifically for a date rather than any number, inspect the cell format using the CELL function or compare against a known date range.
  • How do I check if a cell contains a number stored as text?+
    Use ISTEXT to confirm the cell holds text, then wrap VALUE in ISNUMBER to check if that text is a convertible number: =IF(ISTEXT(A2), ISNUMBER(IFERROR(VALUE(A2),"")), FALSE). As a result, this returns TRUE only when the cell contains a number disguised as text — the most common cause of broken SUM and VLOOKUP formulas. Apply it across a column with SUMPRODUCT to get a count of all affected rows.
  • Why does ISNUMBER(SEARCH(...)) work without IFERROR?+
    SEARCH returns a number when the text is found and returns #VALUE! when it is not. ISNUMBER then evaluates both outcomes — it returns TRUE for a number and FALSE for any error value, including #VALUE!. Consequently, the #VALUE! error from SEARCH is automatically converted to FALSE by ISNUMBER, making IFERROR unnecessary. This is precisely what makes the pattern so compact and easy to read.

More Questions About IS Functions

  • What is the difference between ISNUMBER and ISTEXT?+
    ISNUMBER returns TRUE when a cell holds a genuine number, date, or time value. ISTEXT, by contrast, returns TRUE when a cell holds any text string, including numbers that have been stored as text. The two functions are complementary — a real number gives TRUE from ISNUMBER and FALSE from ISTEXT, and vice versa for a text string. Blank cells, logical values, and errors return FALSE from both.
  • Can I use ISNUMBER in Data Validation?+
    Yes. In the Data Validation dialog, choose Allow: Custom and enter =ISNUMBER(A1). Excel applies this rule to every cell in the selected range. Any entry that ISNUMBER evaluates as FALSE — text, blanks, or errors — will be blocked and an error alert will appear. Combine with AND for additional conditions, such as positive numbers only: =AND(ISNUMBER(A1), A1>0).
  • Which Excel versions support ISNUMBER and ISTEXT?+
    Both functions are available in every Excel version from Excel 2000 onwards, including Microsoft 365, Excel 2024, 2021, 2019, 2016, 2013, 2010, 2007, and earlier. They also work in Excel for the web and Google Sheets. No special version, add-in, or setting is required.