Home ➜ VBA Tutorial ➜ Top VBA Functions ➜ VBA ISNUMERIC Function (Syntax + Example)
The VBA ISNUMERIC function is listed under the information category of VBA functions. When you use it in a VBA code, it evaluates the supplied expression and returns TRUE if it is a numeric value else FALSE. In simple words, it can check whether the value supplied is number or not and returns TRUE or FALSE based on that.
Syntax
IsNumeric(Expression)
Arguments
- Expression: An expression that you want to test if it’s a numeric or not.
Example
To practically understand how to use VBA ISNUMERIC function, you need to go through the below example where we have written a vba code by using it:
Sub example_ISNUMERIC()
Range("B1").Value = IsNumeric(Range("A1"))
End Sub
In the above code, we have used ISNUMERIC to check it the value in the cell A1 is a number or not and it has returned TRUE in the result as we have 98 in the cell A1.
Related Functions
ISARRAY | ISDATE | ISEMPTY | ISERROR | ISMISSING | ISNULL | ISOBJECT