首页 > 解决方案 > SUMPRODUCT 与列上的计算标准

问题描述

Excel表:

       A           B            C             D           E            F         G       H    
1  Products       Date        Sales     Criteria 1:   Product_B      Result:    200
2  Product_A    2020-04-15     500      Criteria 2:   2020-04-15    
3  Product_B    2020-04-12     600              
4  Product_B    2020-04-12     300              
5  Product_B    2020-04-15     200              
6  Product_B    2020-04-20     400              
7  Product_C    2020-04-15     800              
8  Product_C    2020-04-19     900              
9  Product_C    2020-04-30     300              
10
11

在上面的表格中我有不同products的和他们的sales在一定的date
在我根据和Cell G1中的标准计算销售额的总和。Cell E1E2

G1 = SUMPRODUCT((($A$2:$A$100=$E$1)*($B$2:$B$100=$E$2)*$C$2:$C$100))

所有这些都按应有的方式工作。


现在,我想更改date condition公式中的Cell G1

如果在Column Badate + 3 days中与日期匹配,Cell E2则应在总和中考虑Cell G1.

的预期结果Cell G1900


我如何需要修改SUMPRODUCT公式Cell G1以使用计算的date + 3 days = E2标准Column B

标签: excelexcel-formula

解决方案


= SUMPRODUCT((($A$2:$A$100=$E$1)*($B$2:$B$100=($E$2-3))*$C$2:$C$100))

推荐阅读