[英]Excel: SUMPRODUCT with wildcard not matching exact cell content
I would like to make use of SUMPRODUCT depending of an specific identifier (eg 01, 02_01 and so on).我想根据特定标识符(例如 01、02_01 等)使用 SUMPRODUCT。 My solution looks like this so far:到目前为止,我的解决方案如下所示:
=SUMPRODUCT(--(ISNUMBER(SEARCH("??",E2:E9)))*F2:F9*G2:G9)
Now, actually I expected a sum of 1332 matching only line 2 and 7 but it matches all lines.现在,实际上我预计总和 1332 仅匹配第 2 行和第 7 行,但它匹配所有行。 How do I overcome this unwanted behavior?如何克服这种不受欢迎的行为? A VBA solution would be fine too. VBA 解决方案也可以。
Thanks in advance!提前致谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.