-1

如何设置多个条件来告诉我字符串是否不包含某些文本。假设我有

random = 随机文本字符串

If firstCondition <> 0 And InStr(1, random , "s") <> 0 Then
        Sheet1.Cells(1, 1) = "Test 1 OK"
End If

因此,如果“s”将在“随机”中找到。它会返回“Test 1 OK”。

现在我想确保“随机”变量不包含某些文本。我该怎么做?谢谢

4

0 回答 0