如果我在单元格中找到字符串“john”,我希望我的条件成立......并且单元格值可以是John先生或John Carter。这两种情况都应该为我的病情带来真正的价值。
我尝试了以下代码。没工作:
If ActiveCell.Value = "Benchmark report " & "*"
答案 0 :(得分:1)
您可以使用=
:
Like
(相等)
If ActiveCell.Value Like "Benchmark report " & "*"
在帮助文档中查找Like
以获取详细信息。
答案 1 :(得分:0)
试试这个:
newsbox.js?wp-mce-4403-20160901:36 Uncaught ReferenceError: mon _url is not defined
at HTMLDocument.<anonymous> (newsbox.js?wp-mce-4403-20160901:36)
at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload,farbtastic&ver=4.7.3:2)
at Object.add [as done] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload,farbtastic&ver=4.7.3:2)
at n.fn.init.n.fn.ready (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload,farbtastic&ver=4.7.3:2)
at a.fn.init.n.fn.init (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload,farbtastic&ver=4.7.3:2)
at a.fn.init (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload,farbtastic&ver=4.7.3:9)
at n (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload,farbtastic&ver=4.7.3:2)
at newsbox.js?wp-mce-4403-20160901:23
at newsbox.js?wp-mce-4403-20160901:367
答案 2 :(得分:0)
这是在即时窗口中尝试的好方法:
?instr(1,"John carter",lcase("JOHN"),vbTextCompare)>0
然后用ActiveCell
或其他范围替换硬编码值。