[英]SUMIF a cell on the same row, in a certain column, contains a specific text
I'm trying to sum all transactions on a spreadsheet of my bank statement. 我正在尝试在银行对帐单的电子表格中汇总所有交易。 Let's say I have the following under columns BF:
假设我在BF列下有以下内容:
B C D E F G
Date Type Transaction Value Balance ???
row 4 23/05/14 BAC Bank transfer A 1103.55 637.03
row 5 23/05/14 POS Pizza purchase 10.00 627.03
row 6 23/05/14 POS Coffee purchase 10.00 627.03
I'd like to make a new cell on column G which sums all values in column E that are on rows containing "POS" in column C. Is this possible? 我想在G列上创建一个新单元格,该单元格将E列中C列中包含“ POS”的行上的所有值相加。这可能吗?
Yes and I believe the simplest way is by using SUMIF
: 是的,我相信最简单的方法是使用
SUMIF
:
=SUMIF(C:C, "POS", E:E)
In other words, sum E:E if C:C equals "POS". 换句话说,如果C:C等于“ POS”,则求和E:E。
=SUM(IF(C4:C6="POS",1,0)*E4:E6)
is one way. =SUM(IF(C4:C6="POS",1,0)*E4:E6)
是一种方法。 Expand the ranges to taste. 扩大口味范围。
Note this is an array formula : you need to press Ctrl + Shift + Return once you're done editing. 注意,这是一个数组公式 :完成编辑后,需要按Ctrl + Shift + Return。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.