文章内容
1、普通计数
- 统计”我”有几个
![Excel COUNTIF函数的13种使用方法插图 Excel COUNTIF函数的13种使用方法插图](https://static.ntan520.com/blog-media/2023/02/a0fb74795788301937190781b9a1baab.png?x-oss-process=style/watermark)
2、计算非空个数
- 错误值也会统计
![Excel COUNTIF函数的13种使用方法插图2 Excel COUNTIF函数的13种使用方法插图2](https://static.ntan520.com/blog-media/2023/02/695113906fbdedacc6e2a2f7a6629baf.png?x-oss-process=style/watermark)
3、通配符统计
- “*”代表任意字符,以”我”开始的文本个数
![Excel COUNTIF函数的13种使用方法插图4 Excel COUNTIF函数的13种使用方法插图4](https://static.ntan520.com/blog-media/2023/02/5fb3c29ace597a33a1199ddce68ef340.png?x-oss-process=style/watermark)
- 以”我”结尾的文本个数
![Excel COUNTIF函数的13种使用方法插图6 Excel COUNTIF函数的13种使用方法插图6](https://static.ntan520.com/blog-media/2023/02/564bbb1bc16e210419816bd1f86dd69a.png?x-oss-process=style/watermark)
- 包含”我”的个数
![Excel COUNTIF函数的13种使用方法插图8 Excel COUNTIF函数的13种使用方法插图8](https://static.ntan520.com/blog-media/2023/02/b272b07e704838756c8a1f1ff9a545a2.png?x-oss-process=style/watermark)
- “?”代表任意一个字符,可以使用多个”?”,来代表你要统计几个字,统计两个字,且开头以”我”的个数
![Excel COUNTIF函数的13种使用方法插图10 Excel COUNTIF函数的13种使用方法插图10](https://static.ntan520.com/blog-media/2023/02/0e3ea36ff94d213de7cc168738ff9ad7.png?x-oss-process=style/watermark)
- 统计两个字,以”我”结尾的个数
![Excel COUNTIF函数的13种使用方法插图12 Excel COUNTIF函数的13种使用方法插图12](https://static.ntan520.com/blog-media/2023/02/2b37a3cc78e2ca4d1107c4f0ae1dce15.png?x-oss-process=style/watermark)
4、统计错误值个数
- 其他类型的错误值也可统计,比如”#VALUE!”等
![Excel COUNTIF函数的13种使用方法插图14 Excel COUNTIF函数的13种使用方法插图14](https://static.ntan520.com/blog-media/2023/02/4e2f86911fd4fbd7419f72550c4b2573.jpg?x-oss-process=style/watermark)
5、统计空的个数
- 这个不要整列,一定要区域选定,不然下面的空都会被统计
![Excel COUNTIF函数的13种使用方法插图16 Excel COUNTIF函数的13种使用方法插图16](https://static.ntan520.com/blog-media/2023/02/d11e0d4694847bb10077603996aae6c3.png?x-oss-process=style/watermark)
6、统计大于0的个数
- 日期也是数字,一个4万多的数字,设置常规格式即可看见,所以是2个
![Excel COUNTIF函数的13种使用方法插图18 Excel COUNTIF函数的13种使用方法插图18](https://static.ntan520.com/blog-media/2023/02/2e0f91840810093bf474cfff8000dd29.png?x-oss-process=style/watermark)
- 也可以统计小于0的数字
![Excel COUNTIF函数的13种使用方法插图20 Excel COUNTIF函数的13种使用方法插图20](https://static.ntan520.com/blog-media/2023/02/883acd158e8cf379cc9d11df778794ea.png?x-oss-process=style/watermark)
比较符号:"<",">",">=","<=","<>",千万不要写成"≥","≤"这样的,不识别
7、统计不等于包含”我”的个数
- 空的单元格也是<>”我”,也会被统计
![Excel COUNTIF函数的13种使用方法插图22 Excel COUNTIF函数的13种使用方法插图22](https://static.ntan520.com/blog-media/2023/02/3d839a4ad8bf7f1ab67a6618e09b0d74.png?x-oss-process=style/watermark)
8、统计数字的个数
- 9e307是一个很大的数字,够用了,日期也是数字
![Excel COUNTIF函数的13种使用方法插图24 Excel COUNTIF函数的13种使用方法插图24](https://static.ntan520.com/blog-media/2023/02/43b1d82a29bd123522f3f4b61b64cdd8.png?x-oss-process=style/watermark)
9、统计文本的个数
- “咗”是一个很大的数字,也够用了
![Excel COUNTIF函数的13种使用方法插图26 Excel COUNTIF函数的13种使用方法插图26](https://static.ntan520.com/blog-media/2023/02/c88c2178ecc9471b80ca299de69a48be.png?x-oss-process=style/watermark)
10、注意坑
- 注意,A2单元格里是文本”10.10″,我计数的时候想要统计数值10.1的个数,但是也被统计了,所以有文本数字和数值的时候一定要当心,这个时候COUNTIF文本数字和数值是不区分的
![Excel COUNTIF函数的13种使用方法插图28 Excel COUNTIF函数的13种使用方法插图28](https://static.ntan520.com/blog-media/2023/02/81809ab4fd27df81bd297cbb27e9e25a.png?x-oss-process=style/watermark)
- 可以使用SUMPRODUCT函数来计数
有错误值的时候需要IFERROR容错处理,套了IFERROR后SUMPRODUCT需要按CTRL+SHIFT+ENTER,数组公式,如果区域没有错误值,就不用容错处理,输入公式正常回车即可
![Excel COUNTIF函数的13种使用方法插图30 Excel COUNTIF函数的13种使用方法插图30](https://static.ntan520.com/blog-media/2023/02/a8c3f235571bdacca136427556de8189.png?x-oss-process=style/watermark)
11、当统计的数据包含”*”,”~”,”?”这样的通配符时
统计1010规格的时候居然有两个,原来1010里的”*”被当通配符了
![Excel COUNTIF函数的13种使用方法插图32 Excel COUNTIF函数的13种使用方法插图32](https://static.ntan520.com/blog-media/2023/02/349b359fef685a46aedb0f1bb7f058f5.png?x-oss-process=style/watermark)
我们可以把""替换成"~","~"这个符号是转义符,把它转成公式可以识别的"*"本身
- 要是包含”?”和”~”,也要进行替换成”~?”,”~~”再统计,”~”这个符号按住SHIFT,再按ESC键下面的那个键
![Excel COUNTIF函数的13种使用方法插图34 Excel COUNTIF函数的13种使用方法插图34](https://static.ntan520.com/blog-media/2023/02/ff1b6e856d9bc24916eb6c60643252c6.png?x-oss-process=style/watermark)
12、用于相同数据编号
![Excel COUNTIF函数的13种使用方法插图36 Excel COUNTIF函数的13种使用方法插图36](https://static.ntan520.com/blog-media/2023/02/9f4cb855fd8c53963f0f6fc2df9f7a21.png?x-oss-process=style/watermark)
13、统计不重复个数
![Excel COUNTIF函数的13种使用方法插图38 Excel COUNTIF函数的13种使用方法插图38](https://static.ntan520.com/blog-media/2023/02/9ca0f02d99fa4ee570d0afd3c9638a54.png?x-oss-process=style/watermark)
- 当数据中间有空的时候,会出现这个错误
![Excel COUNTIF函数的13种使用方法插图40 Excel COUNTIF函数的13种使用方法插图40](https://static.ntan520.com/blog-media/2023/02/a23cc7c2a51dc589834684328740f1ac.png?x-oss-process=style/watermark)
- 我们加IF来判断,需要三键数组公式
.公式:=SUMPRODUCT(IF(A2:A11<>"",1/COUNTIF(A2:A11,A2:A11)))
![Excel COUNTIF函数的13种使用方法插图42 Excel COUNTIF函数的13种使用方法插图42](https://static.ntan520.com/blog-media/2023/02/82d6a44c5bad4cd07be666812fc0fd7d.png?x-oss-process=style/watermark)