SumIF column a = X AND column b = Y OR Z

adgroves

New Member
Joined
Mar 3, 2015
Messages
12
I'd like to calculate the number of days (column c) that each staff member has

1) committed
2) committed + proposed
3) committed + proposed + possible

I need a formula to the effect of: SumIF column a = X AND column b = Y OR Z



[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C [/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Committed[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Sarah[/TD]
[TD]Proposed[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Bob [/TD]
[TD]Possible[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]Sarah[/TD]
[TD]Committed[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Like this:

=SUMIFS(C:C,A:A,"bob",B:B,"committed")

=SUM(SUMIFS(C:C,A:A,"bob",B:B,{"committed","proposed"}))

=SUM(SUMIFS(C:C,A:A,"bob",B:B,{"committed","proposed","possible"}))

The last one can be re-written if there are 3 choices only in B...

=SUMIFS(C:C,A:A,"bob",B:B,"?*")
 
Upvote 0
1) =SUMPRODUCT(--(A1:A4="Bob"),--(B1:B4="Committed"),C1:C4)
2) =SUMPRODUCT(--(A1:A4="Bob"),--(B1:B4="Committed"),C1:C4) + SUMPRODUCT(--(A1:A4="Bob"),--(B1:B4="proposed"),C1:C4)
3) =SUMPRODUCT(--(A1:A4="Bob"),--(B1:B4="Committed"),C1:C4) + SUMPRODUCT(--(A1:A4="Bob"),--(B1:B4="proposed"),C1:C4) + =SUMPRODUCT(--(A1:A4="Bob"),--(B1:B4="possible"),C1:C4)
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

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