MS Excel: ISNULL Function (VBA)
In Microsoft Excel, the ISNULL function returns TRUE if the expression is a null value. Otherwise, it returns FALSE.
Syntax
The syntax for the ISNULL function is:
IsNull( expression )
expression is a variant that contains a string or numeric value.
Applies To
- Excel 2013, Excel 2011 for Mac, Excel 20010, Excel 2003, Excel XP, Excel 2000
Type of Function
- VBA function (VBA)
VBA Function Example
The ISNULL function can only be used in VBA code. Here are some examples of what the ISNULL function would return:
| IsNull(null) | would return TRUE |
| IsNull("Tech on the Net") | would return FALSE |
For example:
Dim LValue As Boolean
LValue = IsNull("Tech on the Net")
In this example, the variable called LValue would contain FALSE as a value.