user3654819
user3654819

Reputation: 55

How to SUMIF with two conditions in Google Spreadsheet

I need to sum the values from different sheets with two conditions.

The sample layout as following, I'd like to sum the values when Name=Andy,and Type=XXX ; add 35+43+23+35+18

Name      Type      Value
Andy       XXX       35
Bill       XXX       27
Gino       XXX       48
Bill       YYY       35
Andy       XXX       43
Bill       ZZZ       67
Gino       XXX       58
Bill       YYY       25
Andy       XXX       23
Andy       XXX       35
Bill       YYY       17
Gino       XXX       44
Bill       YYY       51
Andy       XXX       18
Bill       ZZZ       73

Please help with the formula. Truly appreciate!!

Upvotes: 5

Views: 5713

Answers (1)

Raptor
Raptor

Reputation: 54268

Definition of SUMIFS() is as follow:

SUMIFS(sum_range, criteria_range1, criterion1, [criteria_range2, criterion2, ...])

Therefore, the formula you want is:

SUMIFS(C2:C20, A2:A20, "Andy", B2:B20, "XXX")

Reference: SUMIFS()

Upvotes: 10

Related Questions