Excel * 文本字符串中的符号

发布于 2025-01-05 22:49:32 字数 152 浏览 0 评论 0原文

文本字符串中的“*”符号是否意味着字符串中可以有任何字符代替“*”?由于某种原因,它在以下代码中不起作用:

=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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

友谊不毕业 2025-01-12 22:49:32

如果您匹配字符串,那么这就很好
=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))

帥小哥 2025-01-12 22:49:32

是的,COUNTIF() 函数可以使用通配符。您的问题似乎是公式的语法不正确。

=COUNTIF(I2:I5000,"2012.01*")

Yes, the COUNTIF() function can take wildcards. Your problem seems to be that the syntax of your formula is incorrect.

=COUNTIF(I2:I5000,"2012.01*")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文