Sumproduct another condition

blossomthe2nd

Active Member
Joined
Oct 11, 2010
Messages
450
Hi there

I am using the below formula to Sum number of accounts in column C when the date in column A is in May.

HTML:
=SUMPRODUCT((MONTH(A2:A6)=5)*(C2:C6))

I wish to add another condition so If its may and Column B = "YES" then sum Column C,

Can anyone please help ?

Also is there a restriction to the amount of Conditions that excel can use in these type of formulas ?

Thanks
Anne
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Cool Thanks VOG ,

So using this I can add loads more conditions to look like the below

HTML:
=SUMPRODUCT(--(MONTH(A2:A6)=5),--(B2:B6="Anne"),--(C2:C6="Yes"),D2:D6)
 
Upvote 0
Yes, you can. There must be a limit to how many conditions you can have but I doubt verey much whether you would exceed it. I've seen sone ginormous SUMPRODUCT formulas posted on here.
 
Upvote 0
CSE (press Ctrl+Shift+Enter):
HTML:
=SUM((A1:A8=5)*(B1:B8="Yes")*C1:C8)
 
Upvote 0
Hi VOG

Can I ask One more thing, I am using this formula across spreadsheets and I'm getting a NUM# error.

HTML:
=SUMPRODUCT(--(MONTH('[1.MASTER LOG.xls]Drawdown'!$B:$B)=2),--('[1.MASTER LOG.xls]Drawdown'!$O:$O="NO"),'[1.MASTER LOG.xls]Drawdown'!$H:$H)

What I wish to happen is look at column B check date is Feb, Check column O where it is No and then count how many results in Column H,

Can you advise why I would happen ?

when I changed the formula ( AS row 1 In log is merged) to the below I get a VALUE# error

HTML:
=SUMPRODUCT(--(MONTH('[1.MASTER LOG.xls]Drawdown'!$B2:$B1000)=2),--('[1.MASTER LOG.xls]Drawdown'!$O2:$O1000="NO"),'[1.MASTER LOG.xls]Drawdown'!$H2:$H1000)

Thanks

Anne
 
Upvote 0
That looks like it should work but I don't think you need .xls

=SUMPRODUCT(--(MONTH('[1.MASTER LOG]Drawdown'!$B2:$B1000)=2),--('[1.MASTER LOG]Drawdown'!$O2:$O1000="NO"),'[1.MASTER LOG]Drawdown'!$H2:$H1000)

Are there error values anywhere in those ranges?
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

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