基于第 1 列和第 2 列值的第 3 列的总和值
Sum value of col 3 based on col 1 and col 2 value
我想根据 col1 和 col2 求和 col3 的值
这是虚拟数据 sheet 的 link,我在其中显示了示例 table,据此我想要第 3 列的总和,请大家检查 sheet并建议我一些解决方案。
https://docs.google.com/spreadsheets/d/1_MeiySJHI8OD84BPDOj_z57My-TXbs2ey4AOkQP3zug/edit?usp=sharing
使用QUERY
:
=QUERY(A:C; "select A,B,sum(C) where A is not null group by A,B label sum(C)''")
更新:
={"result"; INDEX(IF(COUNTIFS(A2:A&" "&B2:B, A2:A&" "&B2:B, ROW(A2:A), "<="&ROW(A2:A))=1,
IFNA(VLOOKUP(A2:A&" "&B2:B,
QUERY({A2:A&" "&B2:B, C2:C},
"select Col1,sum(Col2) where Col1 is not null group by Col1 label sum(Col2)''"), 2, 0)), ))}
我想根据 col1 和 col2 求和 col3 的值
这是虚拟数据 sheet 的 link,我在其中显示了示例 table,据此我想要第 3 列的总和,请大家检查 sheet并建议我一些解决方案。 https://docs.google.com/spreadsheets/d/1_MeiySJHI8OD84BPDOj_z57My-TXbs2ey4AOkQP3zug/edit?usp=sharing
使用QUERY
:
=QUERY(A:C; "select A,B,sum(C) where A is not null group by A,B label sum(C)''")
更新:
={"result"; INDEX(IF(COUNTIFS(A2:A&" "&B2:B, A2:A&" "&B2:B, ROW(A2:A), "<="&ROW(A2:A))=1,
IFNA(VLOOKUP(A2:A&" "&B2:B,
QUERY({A2:A&" "&B2:B, C2:C},
"select Col1,sum(Col2) where Col1 is not null group by Col1 label sum(Col2)''"), 2, 0)), ))}