如图,利用FREQUENCY函数,先在k3-k7输入条件,代表各年龄段的上限(空为无穷大),然后选中L3-L7(计数数据输出区域),插入FREQUENCY函数,Data_array列为数据来源,就是你要统计的那些年龄,Bins_array列为条件(即K3-K7),然后按ctrl+shift+enter(注意不能直接点确定)...
最简单的方法:增加一列【年龄段】,用IF函数判断结果:
=IF(C2<30,"30以下",IF(C2<=40,"31-40",IF(C2<=50,"41-50",IF(C2<=60,"51-60","60以上"))))
然后对这一列进行分类汇总、数据透视、SUMIF都可以
见图,选择E3:E7区域填写公式,数组公式,ctrl+shift+enter结束。
假设年龄右边一列是D,D1=COUNTIF(C:C,"<=30")
D2=COUNTIF(C:C,"<=40")-d1
d3=COUNTIF(C:C,"<=50")-COUNTIF(C:C,"<=40")
d4=COUNTIF(C:C,"<=60")-COUNTIF(C:C,"<=50")
D5=COUNTIF(C:C,">60")
30岁以下
=countif(c:c,"<=30"
31到40
=countifs(c:c,">30",c:c,"<41")
41到50
=countifs(c:c,">40",c:c,"<51")
51到60
=countifs(c:c,">50",c:c,"<61")
60以上
=countif(c:c,">60"