ray88’s diary

お仕事で困ったとき用の自分用の覚書

ExcelVBA セルの値が空の文字列かEmpty値のいずれかに該当するか判定する

■セルの値が空の文字列かEmpty値のいずれかに該当するか判定する

Function IsEmptyString(value As Variant) As Boolean
    If VarType(value) = vbString And value = "" Then
        IsEmptyString = True
    ElseIf IsEmpty(value) Then
        IsEmptyString = True
    Else
        IsEmptyString = False
    End If
End Function