Purpose
Return value
Syntax
=ISNUMBER(value)
- value - The value to check.
Using the ISNUMBER function
The ISNUMBER function returns TRUE when a cell contains a number, and FALSE if not. You can use ISNUMBER to check that a cell contains a numeric value, or that the result of another function is a number.
The ISNUMBER function takes one argument , value , which can be a cell reference, a formula, or a hardcoded value. Typically, value is entered as a cell reference like A1. When value is a number, the ISNUMBER function will return TRUE. Otherwise, ISNUMBER will return FALSE.
Examples
The ISNUMBER function returns TRUE if value is numeric:
=ISNUMBER("apple") // returns FALSE
=ISNUMBER(100) // returns TRUE
If cell A1 contains the number 100, ISNUMBER returns TRUE:
=ISNUMBER(A1) // returns TRUE
If a cell contains a formula, ISNUMBER checks the result of the formula:
=ISNUMBER(2+2) // returns TRUE
=ISNUMBER(2^3) // returns TRUE
=ISNUMBER(10 &" apples") // returns FALSE
Note: the ampersand (&) is the concatenation operator in Excel. When values are concatenated, the result is text.
Count numeric values
To count cells in a range that contain numbers, you can use the SUMPRODUCT function like this:
=SUMPRODUCT(--ISNUMBER(range))
The double negative coerces the TRUE and FALSE results from ISNUMBER into 1s and 0s and SUMPRODUCT sums the result.
Notes
- ISNUMBER will return TRUE for Excel dates and times since they are numeric.
- ISNUMBER will return FALSE for empty cells and errors.
Purpose
Return value
Syntax
=ISODD(value)
- value - The numeric value to check.
Using the ISODD function
The ISODD function tests for odd numbers. ISODD takes one argument , value , which should be a numeric value or a cell reference. When value is an odd number, ISODD returns TRUE. When value is an even number, ISODD returns FALSE. If value is not numeric, ISODD will return the #VALUE error. Only the integer portion of value is evaluated, decimal values are truncated.
Examples
The ISODD function returns TRUE or FALSE:
=ISODD(4) // returns FALSE
=ISODD(3) // returns TRUE
=ISODD(0) // returns FALSE
If cell A1 contains 11, the formula below returns TRUE:
=ISODD(A1) //returns TRUE
Only the integer portion of value is tested. If value is a decimal number, the decimal portion is truncated:
=ISODD(4.1) // returns FALSE
=ISODD(0.33) // returns FALSE
=ISODD(7.4) // returns TRUE
Notes
- If value is not numeric, ISODD will return the #VALUE error.
- Only the integer portion of value is tested; decimal values are truncated.
- Use the ISEVEN function to test for even numbers.