max_max
Board Regular
- Joined
- Jun 29, 2013
- Messages
- 58
Hello everyone
this function does not work if the range cells have formulas
If WorksheetFunction.CountA(Range("A3:A100")) = 0 Then
i tried with this macro
the range is not empty
this function does not work if the range cells have formulas
If WorksheetFunction.CountA(Range("A3:A100")) = 0 Then
i tried with this macro
VBA Code:
Sub vba_check_empty_cells()
Dim i As Long
Dim c As Long
Dim myRange As Range
Dim myCell As Range
Set myRange = Range("a3:a100")
For Each myCell In myRange
c = c + 1
If IsEmpty(myCell) Then
i = i + 1
End If
Next myCell
MsgBox _
"There are total " & i & " empty cell(s) out of " & c & "."
End Sub
the range is not empty