Detect if range is empty
excel, range, vba
Solution
Found a solution from the comments I got.
Sub TestIsEmpty()
If WorksheetFunction.CountA(Range("A38:P38")) = 0 Then
MsgBox "Empty"
Else
MsgBox "Not Empty"
End If
End Sub
Problem
I want to check if a range in Excel is empty. How do I write in VBA code: ``` If Range("A38":"P38") is empty ```