0

我在用着

=IF(OR(ISNUMBER(SEARCH({"word1","word2","word3"},A1))),"YES","NO")

找出A列是否包含我的话。但我只想找到确切的词。例如:我的一句话是and,这个公式说是的Andrea。我不想要那个。

4

2 回答 2

3

这将只匹配 "word1" 而不是 "sword1" 或 "word12"

=IF(OR(ISNUMBER(SEARCH(" "&{"word1","word2","word3"}&" "," "&A1&" "))),"YES","NO")

...虽然 A1 中的标点符号可能会搞砸,这可能吗?

注意:它不区分大小写 - 如果您也想要,请更改SEARCHFIND

于 2013-10-09T13:55:05.343 回答
0

留白技巧。在你的话之前和之后添加空格。在 A1 前后添加空格。

=IF(OR(ISNUMBER(SEARCH({" word1 "," word2 "," word3 "}," "&A1&" "))),"YES","NO")
于 2013-10-09T14:33:25.283 回答