Check IF a Cell Value is a Number

To check if a cell value is a number or not, you can use IF + ISNUMBER in a combination. In this combination ISNUMBER tests if a value is a number or not and returns the result as TRUE and FALSE. After that, IF uses that TRUE or FALSE to return a meaningful value in the result.

check-if-cell-value-is-a-number

Formula to Test IF a Cell Value is a Number

To write this formula you can use the below steps.

  1. First, enter the IF function of a cell.
  2. After that, in the first argument of the IF (logical_text) enter the ISNUMBER function.
  3. Next, in the ISNUMBER function, refer to the cell where you want to test the number.
  4. Now, in the [value_if_true] argument, enter Yes, and in the [value_if_false] argument, enter No. You can also use some other meaningful values if you need.
  5. In the end, enter the closing parentheses and hit enter to get the result.
formula-to-test-cell-value-is-number

The moment you hit enter it returns YES or NO according to the value that you have in the referred cell.

How Does This Formula Works?

As I said, in this formula we have two functions, IF + ISNUMBER. In cell A2, you have a number that’s why you have TRUE in the result by the ISNUMBER.

how-this-formula-works

Now we have TRUE, which is why IF returns YES in the result for the value that you have in cell A2.

Same Formula in Mac

If you use Excel for Mac, the formula will be the same and can be written using the same functions.

same-formula-in-mac

Excel stores a date as a number. And when you have a date in a cell, this ISNUMBER will treat that date as a number and return TRUE in the result. I’m trying to find a solution to this problem, still not able to differentiate between a number and a date while using this formula.

Download Sample File