Excel ISBLANK Function

The Excel ISBLANK function is used to check if a cell is empty

Example: Excel ISBLANK Function

Excel ISBLANK Function

METHOD 1. Excel ISBLANK Function

EXCEL

=ISBLANK("B5")
Result in cell C5 (TRUE) - returns a TRUE value given that cell B5 is blank.

=ISBLANK(B6)
Result in cell C6 (FALSE) - returns a FALSE value given that cell B6 contains a value.

METHOD 2. Excel ISBLANK function using the Excel built-in function library

EXCEL

Formulas tab > Function Library group > More Information > Information > ISBLANK > populate the input box

=ISBLANK(B5)
Note: in this example we are checking if cell B5 is empty. Given cell B5 is empty the function will return a TRUE value.
Built-in Excel ISBLANK Function

METHOD 1. Excel ISBLANK function using VBA with Formula

VBA

Sub Excel_ISBLANK_Function_using_Formula()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("ISBLANK")

'apply the Excel ISBLANK function
ws.Range("C5").Formula = "=ISBLANK(B5)"
ws.Range("C6").Formula = "=ISBLANK(B6)"

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named ISBLANK.

ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell references ("C5") and ("C6") in the VBA code to any cell in the worksheet, that doesn't conflict with formula.
Test Range: Select the cells that you want to check by changing the cell references ("B5") and ("B6") in the VBA code to any cell in the worksheet, that doesn't conflict with the formula.

METHOD 2. Excel ISBLANK function using VBA with IF statement

VBA

Sub Excel_ISBLANK_Function_using_IF_Statement()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("ISBLANK")
'check if cells are blank with an IF Statement
If IsEmpty(ws.Range("B5")) Then

ws.Range("C5") = True

Else

ws.Range("C5") = False

End If

If IsEmpty(ws.Range("B6")) Then

ws.Range("C6") = True

Else

ws.Range("C6") = False

End If

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named ISBLANK.

ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell references ("C5") and ("C6") in the VBA code to any cell in the worksheet, that doesn't conflict with formula.
Test Range: Select the cells that you want to check by changing the cell references ("B5") and ("B6") in the VBA code to any cell in the worksheet, that doesn't conflict with the formula.

METHOD 3. Excel ISBLANK function using VBA with a For Loop and IF statement

VBA

Sub Excel_ISBLANK_Function_using_For_Loop_and_IF_Statement()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("ISBLANK")
For x = 5 To 6
On Error Resume Next
'check if cells are blank using the for loop to loop through the relevant rows and apply the Is Empty formula
If IsEmpty(ws.Cells(x, 2)) Then

ws.Cells(x, 3) = True

Else

ws.Cells(x, 3) = False

End If
Next

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named ISBLANK.

ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell references (Cells(x, 3)) in the VBA code to any cell in the worksheet that doesn't conflict with formula.
Test Range: Select the cells that you want to check by changing the cell references (Cells(x, 2)) in the VBA code to any cell in the worksheet that doesn't conflict with the formula.

METHOD 4. Excel ISBLANK function using VBA with a For Loop and Formula

VBA

Sub Excel_ISBLANK_Function_using_For_Loop_and_Formula()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("ISBLANK")
For x = 5 To 6
On Error Resume Next
'check if cells are blank using the for loop to loop through the relevant rows and apply the ISBLANK formula
ws.Cells(x, 3).Formula = "=ISBLANK(B" & x & ")"

Next

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Range: The Range object is a representation of a single cell or a range of cells in a worksheet.
PREREQUISITES
Worksheet Name: Have a worksheet named ISBLANK.

ADJUSTABLE PARAMETERS
Output Range: Select the output range by changing the cell references (Cells(x, 3)) in the VBA code to any cell in the worksheet that doesn't conflict with formula.
Test Range: Select the cells that you want to check by changing the cell references "B" and "x" which represents the row number in the VBA code to any cell in the worksheet that doesn't conflict with the formula.

Usage of the Excel ISBLANK function and formula syntax

EXPLANATION

DESCRIPTION
The Excel ISBLANK function is used to check if a cell is empty. If a cell is empty the function will return TRUE, however, if the cell contains any characters the function will return.
SYNTAX
=ISBLANK(value)
ARGUMENTS
value: The cell to be tested if it's blank.

ADDITIONAL NOTES
Note 1: If the cell return double quotation marks (""), which present the cell as an empty cell, the ISBLANK function will capture this as a non-blank cell and therefore will return a FALSE value.