Excel VBA @SQL字符串过滤器多个LIKE条件 [英] Excel VBA @SQL String filter Multiple LIKE Condition
本文介绍了Excel VBA @SQL字符串过滤器多个LIKE条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此代码按照预期工作,但我还需要在主题行中排除 Autoreplies
和其他一些字符串。我需要知道是否可以添加2或3个以上的赞。
This code works as intended but I also need to exclude Autoreplies
and some other strings in a subject line. I need to know if it's possible to add 2 or 3 more Likes.
我尝试过And Or条件,但是我收到了一个解析错误。
I tried And and Or conditions but I'm getting a parse error.
以下代码可以正常工作。我只需要在无法投递后添加另一个字符串条件。 Like'%Automatic reply%'。
This code below works. I just need to add another string condition after undeliverable. " Like '%Automatic reply%'".
Filter = "@SQL=" & " Not " & _
"urn:schemas:httpmail:subject" & "" & _
" Like '%undeliverable%'"
谢谢。
推荐答案
或
以下示例有%uneliverable%
或%自动回复%
Filter = "@SQL=" & " Not (urn:schemas:httpmail:subject" & _
" Like '%undeliverable%' Or " & _
"urn:schemas:httpmail:subject" & _
" Like '%Automatic reply%')"
再添加一个过滤器
To Add one more Filter
Filter = "@SQL=" & " Not (urn:schemas:httpmail:subject" & _
" Like '%undeliverable%' Or " & _
"urn:schemas:httpmail:subject" & _
" Like '%Automatic reply%' Or " & _
"urn:schemas:httpmail:subject" & _
" Like '%Bla Bla%')"
这篇关于Excel VBA @SQL字符串过滤器多个LIKE条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文