Sumif with multiple criteria

My current formula:

SUMIF($AA$3:$AA$18,"=F",F24:F39)


But I realized I also get an "FO" involved so I wanted it to sum if that range =F OR =FO. I tried to add SUMIF OR as well as SUMIFS, but got the error that I don't have enough arguments


SUMIF(OR($AA$3:$AA$18,"=FO",$AA$3:$AA$18,"=F",F24:F39))


SUMIFS(F24:F39,AA3:AA18,"=F","=FO")


Can someone assist with the better approach to achieve this or where my error lie


Thx

iPhone 6s Plus, iOS 10.0.1

Posted on Sep 24, 2017 6:14 PM

Reply
1 reply

Sep 25, 2017 7:05 PM in response to Beh162

SUMIF accepts only a single condition.

SUMIFS accepts more than one condition, and ALL must return TRUE for the associated value to be included in the sum.


If I'm reading your statement correctly, you want the value to be included in the sum IF the associated value in F meets one condition OR the associated value in FO meets the second condition. On the face of it, that's pretty easy, but I assume you do not want a value included twice when both conditions are met.


If that assumption is correct, this may do the trick. To keep the syntax the same, I've used SUMIFS throughout, even though some of the expressions involve only one condition.

User uploaded file



The formula shown is in B3:


SUM(SUMIFS(2:2,3:3,"y"),SUMIFS(2:2,4:4,"y"),−SUMIFS(2:2,3:3,"y",4:4,"y"))


The first SUMIFS sums the values in row 2 where condition 1 is met. ( 2 )

The second SUMIFS sums the values in rw 2 where condition 2 is met. ( 2 )

The third SUMIFS sums the values where both conditions are met, ( 1 ), and applies a - to this sum.

SUM sums the three results (2, 2, -1) to arrive at the requested sum value ( 3 ).


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Sumif with multiple criteria

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.