[英]Excel countif - how to count characters like “*”, “?”, “<”
如果我想计算范围或字符串中的实际字符“ *”或CHAR(42“,该如何解决并避免使用通配符?使用CHAR(42)不会解决此问题。
You can preface the asterisks with a ~ and it will count. 您可以在星号前加上〜,然后再进行计数。 For instance:
例如:
=COUNTIF(A:A,"=~*")
Returned the expected value. 返回期望值。
Counting < and > are slightly different. 计数<和>略有不同。
=COUNTIF(A:A,"=>")
and 和
=COUNTIF(A:A,"=<")
It's important to note that characters that can be used as a wild card must have the tilde ~ preceding it. 重要的是要注意,可用作通配符的字符必须在其前面有波浪号〜。
要使用任何字符,则需要使用SUMPRODUCT():
=SUMPRODUCT(($A$1:$A$7="<")*1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.