tech on the net

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

Type of Function

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.