2017-03-27 67 views
1

我有以下的Excel电子表格中示出的产品在列A和它们在B栏折扣:最大与比例标准

 A     B 
1 Product A   40% 
2 Product B   55% 
3 Product C   30% 
4 Product D   30% 
5 Product E   40% 
6 Product F   40% 
7 Product G   60% 
8 Product H   60% 
9 Product I   45% 
10 Product J   40% 
11 Product K   60% 
12 Product L   40% 
13 Product M   50% 
14 
15 Number of Products: 13 (=Count2(B2:B14) 
16 
17 Maximum Discount  ?? 

细胞B17我想要显示的最大折扣,其中至少10%列表中的产品。

因此,我已经创建了下面的“计算表”,其表示各折扣的产品列表中的比例:

 B   C       D    
    Discount Number of products  Proportion in 
       with discount   product list 
22 40%   5      38% (= 5/13) 
23 45%   1       8% (= 1/13) 
24 50%   1       8% (= 1/13) 
25 55%   1       8% (= 1/13) 
26 60%   3      23% (= 3/13) 

基于I使用下面的公式来显示最大折扣此计算表至少10%的比例:

={MAX(If(D22:D26>=0,1,B22:B26,0))} 

这完美的作品至今。然而,我想达到的是“计算表”不再是必要的,并且比例和最大折扣的计算在一个公式中完成。

你有什么想法我可以解决这个问题吗?

回答

1

使用集合()

=AGGREGATE(14,6,B1:B13/(COUNTIF(B1:B13,B1:B13)/B15>0.1),1) 

![enter image description here

0

使用= MODE.SNGL(B:B)式。它会给出一个列中出现大多数次数的折扣