简体   繁体   English

如何计算Excel中两个数字之间的单元格?

[英]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.

相关问题 如何链接 excel 中两个单元格之间的唯一格式? - How do I link the only the formatting between two cells in excel? 如何自动格式化包含字符串和数字的 Excel 单元格? - How do I autoformat excel cells that contains both strings and numbers? EXCEL:如何计算多个单元格中的值模式? - EXCEL: How do I count a pattern of values across multiple cells? 如果文本之间有两个空格,如何在Excel中溢出单元格 - how to spill cells in excel if I have two spaces between text 如何在未定义的单元格集之间计算Excel中的平均值? - How do I calculate average in Excel between an undefined set of cells? 如何将两个或三个单元格相加,然后在 Excel 中乘以 2 - How do I add two or three cells together and then multiply by 2 in excel 在Excel中的两个单元格之间计算相同数量的字符 - Count the same number of characters between two cells in Excel Excel VB计算两个单元格之间的周数 - Excel VB count the number of weeks between two cells 如何在Excel中划分两个带有数字和文本的单元格? - How do you divide two cells in Excel that have numbers and text in them? 如何在 excel 中的数字之间添加逗号? - How do I add in a comma between numbers in excel?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM