📜  VBA 检查单元格是否包含字母或字符串 - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:53.290000             🧑  作者: Mango

代码示例1
Sub IfContains()
    If InStr(ActiveCell.Value, "string") > 0 Then
        MsgBox "The string contains the value."
    Else
        MsgBox "The string doesn't contain the value."
    End If
End Sub