Logical
Checking whether a cell is a number
Definition
Testing whether a cell holds a number means giving ISNUMBER that cell.
Syntax
=ISNUMBER(value)
Arguments
| Argument | Meaning |
|---|---|
value |
The cell to test, such as B2. |
Worked example
A kiln log stores weights in B2:B4. The first weight is a number.
| A: Batch | B: Weight |
|---|---|
| K-1 | 4.5 |
| K-2 | wait |
| K-3 | 8 |
Formula: =ISNUMBER(B2)
Result: TRUE. 4.5 is a number, so the test passes.
Practice
Cell A2 holds hi. In B2, write a formula that shows 1 when A2 is a number and 0 when it is not.
- 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 hi.
Step 1 of 2
Enter =IF(ISNUMBER(A2),1,0) in B2.
A2 is hi, which is not a number, so the result is 0.
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 0.
The next lesson is Flagging a lookup that missed.
Related functions
ISNUMBER is the function that tests whether the cell holds a number.
Common mistake
Testing the label instead of the weight, as in =ISNUMBER(A2): K-1 is text, so the result is FALSE instead of TRUE.