【发布时间】:2021-07-04 03:35:43
【问题描述】:
我正在使用 Google 表格/Excel。 在表 A 中,我有购买了各种商品的客户的姓名,以及这些商品的成本。
A 表
| Column A | Column B | Column C |
|---|---|---|
| Customer A | Toothbrush | $1.00 |
| Customer B | Pencil | $2.00 |
| Customer C | Tent | $5.00 |
| Customer C | Juice | $4.00 |
在表 B 中,我想通过在表 A 中引用他们的姓名来计算每个客户花费的总金额。
表 B
| Column A | Column B |
|---|---|
| Customer A | $1.00 |
| Customer B | $2.00 |
| Customer C | $9.00 |
这是我迄今为止尝试过的。我将这些公式放入工作表 B 的 B 列:
=COUNTIF(A:A,"='Sheet A'!A:A")
=SUMPRODUCT('Sheet A'!C:C,COUNTIF(A:A,"='Sheet A'!A:A))"))
【问题讨论】:
标签: excel google-sheets