我有一张包含3列的excel表 Column1是ClientName,column2是Desrciption,第3列是与描述对应的数字 我需要使用过滤器或for循环对与ClienName的每个描述相对应的数字求和。
换句话说:
col1 col2 col3
Jason Cash 20
Jason Cash 30
Jason Cash 10
Jason Credit 20
Jason Credit 40
John Cash 20
John Cash 10
John Credit 30
John Credit 20
Mary Cash 50
Mary Cash 20
Mary Credit 20
Mary Credit 100
Mary Credit 200
我需要那样的结果
Jason CashTotal CreditTotal
John CashTotal CreditTotal
Mary CashTotal CreditTotal
如何在Excel中完成?
答案 0 :(得分:1)
好吧,关闭它好像你想要一个SumIf或SumIfs。我仍在尝试测试一个例子,看看如何让它正常工作,但这至少足以让你自己开始挖掘。
答案 1 :(得分:0)
我这样解决了
F2 = Jason
F3 = John
F4 = Mary
代码:
G2 (copied down) =SUMIFS($C$2:$C$15,$A$2:$A$15,$F2,$B$2:$B$15,"Cash")
H2 (copied down) =SUMIFS($C$2:$C$15,$A$2:$A$15,$F2,$B$2:$B$15,"Credit")