发布网友 发布时间:2024-05-07 08:20
共1个回答
热心网友 时间:2024-07-11 03:15
比如:大于50=COUNTIF(数据区,">50");
小于50 =COUNTIF(数据区,"<50");
大于或等于50 =COUNTIF(数据区,">=50");
小于或等于50 =COUNTIF(数据区,"<=50");
大于E5单元格的值 =COUNTIF(数据区,">"&$E$5);
小于E5单元格的值 =COUNTIF(数据区,"<"&$E$5);
大于或等于E5单元格的值 =COUNTIF(数据区,">="&$E$5);
小于或等于E5单元格的值 =COUNTIF(数据区,"<="&$E$5)。
扩展资料:
两个条件求个数
(1)>10并且<=15 =SUM(COUNTIF(数据区,">"&{10,15})*{1,-1}) 或者=SUM(COUNTIF(数据区,"<="&{10,15})*{-1,1})
(2)>=10并且<15 =SUM(COUNTIF(数据区,">="&{10,15})*{1,-1}) 或者 =SUM(COUNTIF(数据区,"<"&{10,15})*{-1,1})
(3)>=10并且<=15 =SUM(COUNTIF(数据区,{">=10",">15"})*{1,-1})
(4)>10并且<15 =SUM(COUNTIF(数据区,{">10",">=15"})*{1,-1})或者=SUM(COUNTIF(数据区,{">10","<15"}))-样本数
注:一般多条件计数使用SUMPRODUCT函数,以上方法较少使用,仅供参考。
补充:三个区域计数: 三个区域中>=60 =SUM(COUNTIF(INDIRECT({"a46:a48","b48:b50","c47:c48"}),">=60"))
补充:(集合运算法)
统计范围,比如5<= x <=7
可以分解为(x>=5)-(x>7)
写为函数:
=countif(range,">=5")-countif(range,">7")
这样就可以利用集合的运算知识了。同样实现了上面两个条件求个数相同的目的,并且更简单易于理解。
参考资料来源:百度百科-countif函数