What is the ISNUMBER function?
=ISNUMBER(value)ISNUMBER returns TRUE if a value is a number. 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.
Two uses stand out: checking that quantity and price columns really hold numbers, and turning the result of SEARCH, FIND or MATCH into "found or not". In the second case ISNUMBER turns an error into FALSE, so the result can go straight into IF or a count.
Arguments
- value
- The value or cell to test.
ISNUMBER examples
Example 1. Check for a number
=ISNUMBER(A3)120, so TRUE.
Example 2. Check whether text contains something
=ISNUMBER(SEARCH("team", B2))SEARCH returns a position (a number) or an error, so this is a common "contains" test.
Example 3. Result for each kind of value
=ISNUMBER(A2)Dates are numbers too, so they are TRUE. The text "120" is FALSE.
Value in column A =ISNUMBER(A2) Apple FALSE 120 TRUE (blank) FALSE TRUE FALSE #N/A FALSE #DIV/0! FALSE "120" (text) FALSE Example 4. Is it in the list?
=ISNUMBER(MATCH(A2, $F$2:$F$50, 0))TRUE if A2 appears in F2:F50. When MATCH returns #N/A the result is FALSE.
Common mistakes
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.
Dates
Dates are serial numbers, so they are TRUE.
Treating blanks as numbers
A blank cell acts as 0 in arithmetic, but ISNUMBER returns FALSE for it.
FAQ
- How do I turn text numbers into numbers?
- Use VALUE or =A8*1.
- The opposite?
- Use ISTEXT.
- How do I check a quantity column?
- =IF(ISNUMBER(C2), "", "Enter a number").