这引用了[SO问题]Counting unique list of items from range based on criteria from other ranges Scot Craner 建议的公式是:
=SUM(--(FREQUENCY(IF(B2:B7<=25,IF(C2:C7<=35,COUNTIF(A2:A7,"<"&A2:A7),""),""),COUNTIF(A2:A7,"<"&A2:A7))>0))
除了所附快照中显示的这一步之外,我已经能够清楚地理解公式的逻辑和计算。 根据 MS Office 文档:
FREQUENCY(data_array, bins_array) The FREQUENCY function syntax has the following arguments: Data_array Required. An array of or reference to a set of values for which you want to count frequencies. If data_array contains no values, FREQUENCY returns an array of zeros. Bins_array Required. An array of or reference to intervals into which you want to group the values in data_array. If bins_array contains no values, FREQUENCY returns the number of elements in data_array.
我很清楚 {1;1;4;0;"";"") 如何进入 data_array 以及 {1;1;4;0;5;3} 如何进入 bins_array。但是我不清楚它如何评估为 {2;0;1;1;0;0;0} 。 如果有人能清楚地解释它,我将不胜感激。
最佳答案
所以你想知道如何
FREQUENCY({1;1;4;0;"";""},{1;1;4;0;5;3})
计算结果为 {2; 0;1;1;0;0;0}
?
问题是 bins_array
不需要排序即可使 FREQUENCY
正常工作。但当然,它在内部必须对 bins_array
进行排序,以获得将 data_array
中的值分组到的间隔。然后它进行分组和计数,然后按照 bins_array
中给出的 bin 的相同顺序返回计数的数字。
Scores Bins
1 1
1 1
4 4
0 0
"" 5
"" 3
Bins sorted
0 (<=0)
1 (>0, <=1)
1 (>1, <=1) == not possible
3 (>1, <=3)
4 (>3, <=4)
5 (>4, <=5)
(>5)
Bin Description Result
1 Number of scores (>0, <=1) 2
1 Number of scores (>1, <=1) == not possible 0
4 Number of scores (>3, <=4) 1
0 Number of scores (<=0) 1
5 Number of scores (>4, <=5) 0
3 Number of scores (>1, <=3) 0
Number of scores (>5) 0
关于excel - 频率公式评估的中间步骤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54050483/