[英]Why isn't isnumber search not working correctly with given data?
I am trying to get Excel to search for a series of keywords in title using the ISNUMBER()
search function, but it's bringing back all FALSE
, which is wrong. 我正在尝试让Excel使用
ISNUMBER()
搜索功能来搜索标题中的一系列关键字,但是它带回了所有FALSE
,这是错误的。 Any help would be greatly appreciated: 任何帮助将不胜感激:
I made sure I F4'd the item list -- still wrong 我确定我F4是物品清单-仍然错误
=ISNUMBER(SEARCH(R2,$G$2:$G$22))
Use MATCH: 使用MATCH:
=ISNUMBER(MATCH("*"&R2&"*",$G$2:$G$22,0))
With the Search set up the way you have it, it will only return the value of the first in the list. 通过“搜索”设置您拥有的方式,它将仅返回列表中第一个的值。 You can wrap SUMPRODUCT around the formula:
您可以在公式周围包裹SUMPRODUCT:
=SUMPRODUCT(--ISNUMBER(SEARCH(R2,$G$2:$G$22)))>0
But that is more intensive then the simple MATCH. 但这比简单的MATCH更密集。
This assumes that the Keyword that is being looked-up is in R2 and the range $G$2:$G$22
us the list of titles. 假设要查找的关键字在R2中,并且标题列表中的范围
$G$2:$G$22
。
If it is the other way around then the SEARCH is backwards and should be: 如果相反,则SEARCH向后,应为:
=SUMPRODUCT(--ISNUMBER(SEARCH($G$2:$G$22,R2)))>0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.