Anonymoose
Anonymoose

Reputation: 143

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 B-F:

         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?

Upvotes: 0

Views: 6414

Answers (2)

Jerry
Jerry

Reputation: 71538

Yes and I believe the simplest way is by using SUMIF:

=SUMIF(C:C, "POS", E:E)

In other words, sum E:E if C:C equals "POS".

Upvotes: 5

Bathsheba
Bathsheba

Reputation: 234635

=SUM(IF(C4:C6="POS",1,0)*E4:E6) is one way. Expand the ranges to taste.

Note this is an array formula: you need to press Ctrl + Shift + Return once you're done editing.

Upvotes: 0

Related Questions