SUM a row IF conditions apply

Chryso

New Member
Joined
May 15, 2008
Messages
10
Could someone please help?
Need to sum up all values in a column based certain conditions. See example below:

Amount Status_1 Status_2 REF
500 YES PENDING POP
1200 YES PAID POP
2500 YES PENDING BOC
8000 NO PENDING BOC
1800 YES PENDING POP

The formula to sum up all amounts that fulfill the following three condtions
IF,
Status_1 = YES
Status_2 = PENDING
REF = POP

In this example, the result should be €2.300 (ie adding row 1 and row 5)

Please helppppp!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Try

=SUMPRODUCT(--(B2:B6="YES"),--(C2:C6="PENDING"),--(D2:D6="POP"),A2:A6)
 
Upvote 0
Could someone please help?
Need to sum up all values in a column based certain conditions. See example below:

Amount Status_1 Status_2 REF
500 YES PENDING POP
1200 YES PAID POP
2500 YES PENDING BOC
8000 NO PENDING BOC
1800 YES PENDING POP

The formula to sum up all amounts that fulfill the following three condtions
IF,
Status_1 = YES
Status_2 = PENDING
REF = POP

In this example, the result should be €2.300 (ie adding row 1 and row 5)

Please helppppp!
Try one of...

=SUMPRODUCT(RangeToSum,--(RangeStatus_1="Yes"),--(RangeStatus_2="Pending"),--(RangeREF="Pop"))

=SUMIFS(RangeToSum,RangeStatus_1,"Yes",RangeStatus_2,"Pending",RangeREF,"Pop")
 
Upvote 0
The "SUMPRODUCT" function works but doesn't give the correct result,
the "SUMIFS" returns a #VALUE command :(
 
Upvote 0
SUMPRODUCT working here

Excel Workbook
ABCDE
1AmountStatus_1Status_2REF2300
2500YESPENDINGPOP
31200YESPAIDPOP
42500YESPENDINGBOC
58000NOPENDINGBOC
61800YESPENDINGPOP
Sheet10




SUMIFS is only available in Excel 2007 and later.
 
Upvote 0
This also helped me as "Sum(If(And" wasn't working. My question is what are the dashes doing in the formula "(--(B2:B6="YES")"? It doesn't work without them so I was just wondering what their function is.

Thanks.
 
Upvote 0
This also helped me as "Sum(If(And" wasn't working. My question is what are the dashes doing in the formula "(--(B2:B6="YES")"? It doesn't work without them so I was just wondering what their function is.

Thanks.

=SUMPRODUCT(RangeToSum,--(RangeStatus_1="Yes"),--(RangeStatus_2="Pending"),--(RangeREF="Pop"))

Or...

=SUMPRODUCT(A2:A6,--(B2:B6="YES"),--(C2:C6="PENDING"),--(D2:D6="POP"))

is equivalent to:

=SUM(IF(RangeStatus_1="Yes",IF(RangeStatus_2="Pending",IF(RangeREF="Pop",RangeToSum))))

which must be confirmed with control+shift+enter, not just enter.

Here are some links on the -- bit:

http://www.mrexcel.com/forum/showthread.php?t=202204

http://www.mrexcel.com/forum/showthread.php?t=128907

http://www.mrexcel.com/forum/showthread.php?t=70547
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,234
Members
452,898
Latest member
Capolavoro009

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top