Excel * 文本字符串中的符号
文本字符串中的“*”符号是否意味着字符串中可以有任何字符代替“*”?由于某种原因,它在以下代码中不起作用:
=COUNTIF(Workbook1!I2:I5000;"2012.01*")
是否有其他方法可以实现我所需要的?
Does the ' * ' symbol in a text string mean that there can be any characters in the string in the place of ' * '? For some reason it doesn't work in the following code:
=COUNTIF(Workbook1!I2:I5000;"2012.01*")
Is there an alternative way to achieve what I need?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您匹配字符串,那么这就很好
=COUNTIF(Workbook1!I2:I5000;"2012.01*")
如果您要匹配数字,那么上面的公式将不起作用,请尝试此操作
=COUNTIF(Workbook1!I2:I5000,">=2012.01")
仅匹配
xl07 及以后版本中以 2012.01 开头且小于 2012 的数字
=COUNTIFS(Workbook1!I2:I5000,">=2012.01",Workbook1!I2:I5000,"<2012.02")
所有版本,包括 xl03
=SUMPRODUCT(--(Workbook1!I2:I5000>=2012.01),--(Workbook1!I2:I5000<2012.02))
If you are matching strings then this is fine
=COUNTIF(Workbook1!I2:I5000;"2012.01*")
If you are matching against numbers then your formula above wont work try this instead
=COUNTIF(Workbook1!I2:I5000,">=2012.01")
To match only numbers starting with 2012.01 And less than 2012
in xl07 and onwards
=COUNTIFS(Workbook1!I2:I5000,">=2012.01",Workbook1!I2:I5000,"<2012.02")
all versions including xl03
=SUMPRODUCT(--(Workbook1!I2:I5000>=2012.01),--(Workbook1!I2:I5000<2012.02))
是的,COUNTIF() 函数可以使用通配符。您的问题似乎是公式的语法不正确。
Yes, the COUNTIF() function can take wildcards. Your problem seems to be that the syntax of your formula is incorrect.