Reputation: 17
it has been a while since I last used excel. I've been trying to get the sum but always keeps getting stuck.
=SUMIF(Sheet1!C:C,"YES",Sheet2!A:A,Sheet1!A:A,(Sheet1!B:B))
I've been trying to add Sheet1 ColumnB if Sheet1 ColumnC contains the word "YES", and if Sheet1 ColumnA matches Sheet2 ColumnA
The idea is to add Sheet1 ColumnB based on two criteria. Sheet1 ColumnA matches Sheet2 ColumnA and Sheet1 ColumnC must contain the text "YES"
**Sheet1**
ColumnA ColumnB ColumnC
Row1 A 4 YES
Row2 B 5
Row3 C 6 YES
Row4 A 6
Row5 D 6 YES
Row6 A 6 YES
**Sheet2**
ColumnA
Row1 A
Row2 B
Row3 C
Sheet2 ColumnB should look like below (based on the example above)
**Sheet2**
ColumnA ColumnB
Row1 A 10
Row2 B 0
Row3 C 6
Upvotes: 0
Views: 34
Reputation: 152505
Use SUMIFS(). In B1:
=SUMIFS(Sheet1!B:B,Sheet1!C:C,"YES",Sheet1!A:A,A1)
Then copy drag down.
Upvotes: 1