如何用excel函数统计一定范围内不同项的个数

2024-11-01 16:26:43
推荐回答(3个)
回答1:

  可以加一个辅助列,(这列可以隐藏),公式:


  =IF(COUNTIF(A$1:A1,A1)=1,IF(AND(A1>=$B$1,A1<=$C$1),1,0),"")


  

回答2:

=SUM((IF(MATCH(A1:A12,A1:A12,)=ROW(1:12),A1:A12,9E+103)>=B1)*(IF(MATCH(A1:A12,A1:A12,)=ROW(1:12),A1:A12,9E+103)<=C1)) 按组合键ctrl+shift+enter结束公式

回答3:

D1公式

=SUMPRODUCT(1/COUNTIF(A1:A12,A1:A12),--(A1:A12>=B1),--(A1:A12<=C1))