【发布时间】:2017-03-18 15:38:31
【问题描述】:
Google 表格问题。
我有以下包含费用的表格(名为“x”):
Date Sum Category
1/Jan/2017 100 red
2/Jan/2017 200 blue
3/Jan/2017 10 red
4/Jan/2017 20 blue
1/Feb/17 1 red
2/Feb/17 2 blue
我需要计算每个类别的每月总计:
Month Red Blue
Jan/17 110 220
Feb/17 1 2
我目前的解决方案是在每个结果单元格中放置如下内容:
=SUM(IFERROR(FILTER(x!$B:$B, MONTH(x!$A:$A)=MONTH($A2), x!$C:$C="red")))
我在问是否有更好的方法。我想让一个结果公式处理一个数组(可能是一个 ArrayFormula?!),而不是在每个单元格中放置和自定义我的公式。
有什么想法吗?!谢谢!
【问题讨论】:
标签: google-sheets spreadsheet formulas