如何进行 excel 模糊条件的个数统计 countif函数的模糊条件统计功能
时间:2023-03-19 06:08:22
=countif函数也叫单条件统计函数,就是说符合一种条件,从而计算符合这个条件的个数。比如要统计公司里面女生有多少人或男生有多少人,就自然会想到countif函数。
公式如下:
=countif(区域,条件)。参看动图就能理解这个函数的精确条件统计。
但本例小伙伴的条件匹配比较模糊,只要是单元格包含4号楼的信息就统计出个数,不管是4号楼几层,这个该如何处理呢?
用到countif函数的高级使用方法,模糊条件统计。
看下图的公式,注意公式中条件的表达。
=COUNTIF(C4:C17,"4*")
4* 表示单元格中只要是4开头,后面是任意内容则用*号代替。* 也叫通配符,代表所有信息。
当函数的参数超过两个字符,则需要用引号引起来,就成了这样 “4*”
如果4不在开头怎么办呢,例如下面的例子。
=COUNTIF(C4:C17,"*4*")
*4*,表示只要单元格包含4,就统计他的个数。
但上图有个问题,他会把C14单元格的“19号楼4层”给统计进去了!这该如何处理?
显然只统计包含4这个数字这个条件就不行了,应该用包含 4号 两个字的条件。所以公式写成下面效果:
=COUNTIF(C4:C17,"*4号*")
总结:countif函数看上去是个简单的条件统计函数,但实际有上有很多玄机。大家平时一定积累工作中常见的问题,大部分的单条件统计都可以用countif函数搞定。
标签:excel模糊条件的个数统计,countif模糊条件统计功能
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
win10系统下如何打开pdf文件并修改
2022-06-14 15:04:32
![](https://img.aspxhome.com/file/2023/28/a243025_0s.jpg)
win10键盘锁住了怎么解锁?两种方法轻松解决!
2022-08-21 12:48:20
![](https://img.aspxhome.com/file/2023/30/a266045_0s.jpg)
win10预览版10125更新内容 windows10build10125更新日志
2023-02-09 21:44:57
![](https://img.aspxhome.com/file/2023/28/a250082_0s.jpg)
Win8系统下wifi显示网络受限如何解决?
2022-10-10 16:57:43
![](https://img.aspxhome.com/file/2023/2/a291118_0s.png)
联想电脑怎么重装系统win10?系统之家一键重装系统步骤
2022-09-24 03:35:03
![](https://img.aspxhome.com/file/2023/1/a272079_0s.png)
word最后一页空白页怎么删除
2023-12-03 03:13:40
![](https://img.aspxhome.com/file/2023/0/19790_0s.jpg)
Dell戴尔笔记本怎么重装Win8系统
2022-11-20 13:18:55
![](https://img.aspxhome.com/file/2023/3/a301620_0s.jpg)
新氧白条如何使用?新氧白条使用方法
2023-10-07 09:46:55
![](https://img.aspxhome.com/file/2023/8/a337947_0s.jpg)
如何在Excel里开三次方
2022-12-13 07:18:06
![](https://img.aspxhome.com/file/2023/2/a154102_0s.jpg)
Win7系统开机后弹出supervisory.exe应用程序错误提示框
2022-05-31 20:16:28
![](https://img.aspxhome.com/file/2023/28/a249520_0s.jpg)
Win10系统怎么设置回收站自动清空?
2023-03-01 22:26:49
![](https://img.aspxhome.com/file/2023/29/a260949_0s.jpg)
升级Win11以后数字小键盘不能用了怎么办?
2023-02-05 15:10:03
![](https://img.aspxhome.com/file/2023/27/a237113_0s.jpg)
word行距1.25倍怎么设置?
2022-05-30 21:32:49
![](https://img.aspxhome.com/file/2023/3/35883_0s.png)
十大功能重点介绍 | iPadOS 是什么?和 iOS 13 有什么区别?
2023-11-19 05:19:56
![](https://img.aspxhome.com/file/2023/7/a197637_0s.jpg)
如何用U盘安装win10专业版
2023-11-08 09:38:53
![](https://img.aspxhome.com/file/2023/1/48231_0s.png)
简便高效的mac技巧分享~
2023-01-07 22:53:21
![](https://img.aspxhome.com/file/2023/7/a209547_0s.jpeg)
QQ登陆界面怎么设置透明的?
2023-08-25 08:28:42
![](https://img.aspxhome.com/file/2023/8/a339439_0s.jpg)
Word制作常用公文的方法
2023-12-01 20:59:38
![](https://img.aspxhome.com/file/2023/9/19479_0s.png)
WinXP系统下如何建立双网关默认只允许指向一个网关
2022-09-10 22:19:14
![](https://img.aspxhome.com/file/2023/29/a252244_0s.jpg)
Windows 10正式版发布会现场直播直播 7月29日19:00开始
2022-03-28 15:45:17
![](https://img.aspxhome.com/file/2023/28/a248809_0s.jpg)