[英]How do I count cells that are between two numbers in Excel?
I need a formula to count the number of cells in a range that are between 10 and 10.000: 我需要一个公式来计算范围在10到10.000之间的单元格数量:
I have: 我有:
=COUNTIF(B2:B292,>10 AND <10.000)
But how do I put the comparison operators in without getting a formula error? 但是如何在不出现公式错误的情况下放置比较运算符?
If you have Excel 2007 or later use COUNTIFS
with an "S" on the end, ie 如果您使用Excel 2007或更高版本,则最后使用带有“S”的
COUNTIFS
,即
=COUNTIFS(B2:B292,">10",B2:B292,"<10000")
You may need to change commas , to semi-colons ; 您可能需要将逗号更改为分号;
In earlier versions of excel use SUMPRODUCT
like this 在早期版本的excel中使用像这样的
SUMPRODUCT
=SUMPRODUCT((B2:B292>10)*(B2:B292<10000))
Note: if you want to include exactly 10 change > to >= - similarly with 10000, change < to <= 注意:如果您想要包含10个>>> = - 与10000类似,请将<更改为<=
Example- 例-
For cells containing the values between 21-31, the formula is: 对于包含21-31之间的值的单元格,公式为:
=COUNTIF(M$7:M$83,">21")-COUNTIF(M$7:M$83,">31")
= COUNTIFS(H5:H21000,“> = 100”,H5:H21000,“<999”)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.