【发布时间】:2020-04-12 21:13:35
【问题描述】:
A B C D E F G E
1 Products Suppliers Value Criteria 1: Product_C Result: 600
2 Product_A Supplier_01 500 Criteria 2: Supplier_01
3 Product_B Supplier_01 600 Criteria 3: Supplier_03
4 Product_B Supplier_02 300
5 Product_C Supplier_01 200
6 Product_C Supplier_01 400
7 Product_C Supplier_03 800
8
9
在表格中,您可以找到不同的 Products (Column A) 和 Suppliers (Column B) 列表。
在Cell G1中,如果满足以下条件,我想获取Column C中的值的sum:
产品 = Product_C AND
供应商 = Supplier_01 或 Supplier_03
这些条件在Cells E1:E3 中输入为Criteria 1-3。
为了实现这一点,我尝试使用这些问题 (Q1,Q2) 的解决方案,这给了我正确的结果:
G1 =SUM(SUMIFS($C:$C,$A:$A,$E$1,$B:$B,{"Supplier_01","Supplier_02"}))
但是,我对这个解决方案的问题是我需要手动输入OR-criterias 作为{"Supplier_01","Supplier_02"}。
如何更改我的公式,以便我可以参考 Cells E2:E3 中的值,如果用户更改这些值,结果会自动调整?
【问题讨论】:
-
您愿意将列D用作“帮助”列吗?
标签: excel excel-formula