excel中怎样用COUNTIF计算在两个数值之间的数的个数

2024-11-16 08:30:50
推荐回答(5个)
回答1:

  举例说明,假如以A1单元格到A50单元格中的数据为依据。要统计大于10小于30之间的个数有多少(前提条件是数据中最小的数要小于等于10,最大的数要大于等于30),在一个空白单元格中输入的公式,可以分为四种情况:
  1、大于10并且小于等于30,
  =SUM(COUNTIF(A1:A50,">"&{10,30})*{1,-1})
  2、大于等于10并且小于30
  =SUM(COUNTIF(A1:A50,">="&{10,30})*{1,-1})
  3、大于等于10并且小于等于30
  =SUM(COUNTIF(A1:A50,{">=10",">30"})*{1,-1})
  4、大于10并且小于30
  =SUM(COUNTIF(A1:A50,{">10",">=30"})*{1,-1})

回答2:

用这个函数 不能直接一次 计算出来 而是应该使用两个计算来相减……
=COUNTIF(c2:c18,">=5")-countif(c2:c18,">10")

回答3:

=COUNTIF(B3:C8,">=5")-COUNTIF(B3:C8,">10")

回答4:

=countif(c2:c18,">=5")-countif(C1:C18,">10")

回答5:

=COUNTIF($C$2:$C$20,"<=10")-COUNTIF($C$2:$C$20,"<=5")