SUMIFS with OR criteria in Google Sheets

Sample Table

I want to add values in Column C with the conditions that Column B = 0, AND Column A = "a" OR "b"

From what I've searched, this would work, but only in excel:

=SUM(SUMIFS(C:C,B:B,0,A:A,{"a","b"}))

I've tried adding "ArrayFormula" as this is a supposedly 'fix' for the above formula for Google Sheets (but tbf, I've only seen it used in COUNTIFS not SUMIFS)

=ArrayFormula(SUM(SUMIFS(C:C,B:B,0,A:A,{"a","b"})))

My expected result should be 4 but it keeps on returning 1. Weirdly, if I switch "a" and "b", it would return 3. As if it doesnt take the second criteria into account.

Ive been searching for days now, any help would be appreciated!



Read more here: https://stackoverflow.com/questions/68483937/sumifs-with-or-criteria-in-google-sheets

Content Attribution

This content was originally published by Laine at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: