How to use the VBA ISEMPTY Function (Syntax + Example)

HomeVBA Functions LIST (Category Wise)How to use the VBA ISEMPTY Function (Syntax + Example)

The VBA ISEMPTY 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 blank else FALSE. In simple words, it can check whether the value supplied is a blank or not and returns TRUE or FALSE based on that. It’s equivalent to the worksheet’s ISEMPTY function.

Syntax

IsEmpty(Expression)

Arguments

  • Expression: An expression that you want to test if it’s a blank or not.

Example

To practically understand how to use VBA ISEMPTY function, you need to go through the below example where we have written a vba code by using it:

Sub example_ISEMPTY()
Range("B1").Value = IsEmpty(Range("A1"))
End Sub

In the above code, we have used ISEMPTY to check if the cell when is empty or not and it has returned TRUE in the result as cell A1 is blank.

Related Functions

ISARRAY | ISDATE | ISERROR | ISMISSING | ISNULL | ISNUMERIC | ISOBJECT