Excel VBA - How to Check if Cell is Empty

preview_player
Показать описание
Excel VBA - Learn how to check if cell is empty.

The code used in this video:

Sub CheckIfCellIsEmpty()

Dim isMyCellEmpty As Boolean
isMyCellEmpty = IsEmpty(Range("A1"))

If isMyCellEmpty = True Then
MsgBox "Cell Empty"
Else
MsgBox "Cell is not Empty"
End If

End Sub
Рекомендации по теме
Комментарии
Автор

Is there a way to check content for say ("1:17") instead of one cell?

zreed
Автор

Hi! Im using this:
isMyCellEmpty =
but is always true, even when I have letters I guess Strings. What could be wrong?

MARQUITOSGUALACBA
Автор

if i need to check from cell B1:B8 if any value is > 100 then msg "hi" else msg "bye", How to perform.

namanagarwal
Автор

What if i want to Check more than one Cell in a loop with a variable rownumber?

SirWallace