Sum multiple If statements?

Dcata

New Member
Joined
Apr 10, 2018
Messages
7
Please help!

Is there a formula that I can put into cell E5 that calculates... for cells E2:E4 if E=1 and D="" then B*C, and then returns the sum in E5?

Cheers!

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]person[/TD]
[TD]Cost[/TD]
[TD]%[/TD]
[TD]mon[/TD]
[TD]tue[/TD]
[TD]wed[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]aa[/TD]
[TD]20000[/TD]
[TD]10%[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]bb[/TD]
[TD]30000[/TD]
[TD]20%[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]cc[/TD]
[TD]10000[/TD]
[TD]30%[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD]Cost[/TD]
[TD][/TD]
[TD][/TD]
[TD]6000[/TD]
[TD]3000[/TD]
[/TR]
</tbody>[/TABLE]
 

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.
Does this do what you want?


Excel 2010
ABCDEF
1personCost%montuewed
2aa2000010%111
3bb3000020%11
4cc1000030%1
5Cost60003000
Sheet5
Cell Formulas
RangeFormula
E5=SUMPRODUCT(--(E2:E4=1),--(D2:D4=""),$B$2:$B$4*$C$2:$C$4)
F5=SUMPRODUCT(--(F2:F4=1),--(E2:E4=""),$B$2:$B$4*$C$2:$C$4)
 
Upvote 0
Welcome to the Board!

This would do that:
Code:
=SUMPRODUCT(--(E2:E4=1),--(D2:D4=""),B2:B4*C2:C4)


EDIT: Too slow, looks like Scott beat me to the punch!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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