Logical
ISNUMBER
Definition
ISNUMBER returns TRUE when its argument is a number, and FALSE otherwise.
Syntax
=ISNUMBER(value)
Arguments
| Argument | Meaning |
|---|---|
value |
The cell or result to test. |
Worked example
A depot lists lot codes that should be numbers. Codes are in B2:B4.
| A: Lot | B: Code |
|---|---|
| 1 | 441 |
| 2 | box |
| 3 | 18 |
Formula: =IF(ISNUMBER(B2),1,0)
Result: 1. 441 is a number, so ISNUMBER is true and IF returns 1. Filled down, the formula gives 1, 0, and 1.
Practice
Cell A2 holds 12. In B2, write a formula that returns 1 when A2 is a number and 0 otherwise.
- In B2, write an IF formula that uses ISNUMBER and shows 1 when A2 is a number, and 0 otherwise.
- B2 should show the result for 12.
Step 1 of 2
Enter =IF(ISNUMBER(A2),1,0) in B2.
A2 is 12, which is a number, so the result is 1.
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…
B2 uses ISNUMBER.
B2 now shows 1.
Related functions
IF often wraps ISNUMBER so the cell can show 1 or 0 instead of TRUE or FALSE.
Common mistake
Typing a number as text, such as '12: ISNUMBER then returns FALSE, even though the cell looks numeric.