答案 0 :(得分:3)
以下 UDF()将确定单元格小中的所有单词是否出现在单元格大中:
Public Function AreIn(Little As String, Big As String) As Boolean
Dim good As Boolean, aLittle, aBig, L, B
AreIn = False
aLittle = Split(LCase(Little), " ")
aBig = Split(LCase(Big), " ")
For Each L In aLittle
good = False
For Each B In aBig
If L = B Then
good = True
End If
Next B
If good = False Then Exit Function
Next L
AreIn = True
End Function
此处" word" 是一组不包含空格的字符。该测试不区分大小写。例如: