Sumproduct - Non Adjacent Cells

cshetty

Board Regular
Joined
Apr 15, 2017
Messages
78
Office Version
  1. 2016
Platform
  1. Windows
Dear Experts

Please help me with this formula to sum non adjacent cells based on criteria.

=SUMPRODUCT(((Schedule!$M$5:$M$2316),(Schedule!$O$5:$O$2316))*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))

Getting #Value error.

Thanks in advance.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Does this work, I just changed the comma to an asterisk?
=SUMPRODUCT(((Schedule!$M$5:$M$2316)*(Schedule!$O$5:$O$2316))*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))
 
Upvote 0
.. or try just removing these two sets of parentheses, especially the blue ones.

=SUMPRODUCT(((Schedule!$M$5:$M$2316),(Schedule!$O$5:$O$2316))*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))

=SUMPRODUCT(Schedule!$M$5:$M$2316,(Schedule!$O$5:$O$2316)*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))
 
Upvote 0
Dear Experts

Please help me with this formula to sum non adjacent cells based on criteria.

=SUMPRODUCT(((Schedule!$M$5:$M$2316),(Schedule!$O$5:$O$2316))*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))

Getting #Value error.

Thanks in advance.
Hi Special-K99
This isn't working. Results gives an exorbitant number.
 
Upvote 0
.. or try just removing these two sets of parentheses, especially the blue ones.

=SUMPRODUCT(((Schedule!$M$5:$M$2316),(Schedule!$O$5:$O$2316))*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))

=SUMPRODUCT(Schedule!$M$5:$M$2316,(Schedule!$O$5:$O$2316)*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))
Hi Peter

This gives an exorbitant number. Must be multiplying with the date value as well.
 
Upvote 0
In that case you need to carefully explain exactly what the formula is supposed to do or better still do that and give a small set of dummy data for both sheets with irrelevant columns hidden and include the expected result. If you choose carefully probably 10 or so rows from Schedule should be enough to demonstrate. XL2BB would be preferred so we can easily copy to test with.

Since yo gave us a non-working formula we had to guess what you wanted the formula to do. Not too surprising then if we guessed incorrectly. ;)
 
Upvote 0
Another guess is
Excel Formula:
=SUMPRODUCT(((Schedule!$M$5:$M$2316)+(Schedule!$O$5:$O$2316))*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))
 
Upvote 0
Solution
In that case you need to carefully explain exactly what the formula is supposed to do or better still do that and give a small set of dummy data for both sheets with irrelevant columns hidden and include the expected result. If you choose carefully probably 10 or so rows from Schedule should be enough to demonstrate. XL2BB would be preferred so we can easily copy to test with.

Since yo gave us a non-working formula we had to guess what you wanted the formula to do. Not too surprising then if we guessed incorrectly. ;)
Hi Peter
Mnn. I understand. Let me explain the scenario.

Range M & O has amounts payable. (Schedule Sheet)
Range D has due dates. (Schedule Sheet)
Range G has Client Nane. (Schedule Sheet)
Range B in my report sheet has Month beginning date.

In result cell I want the total of amounts payable from schedule sheet, for a particular client, if the due date in schedule sheet is matching the month & year in range B of report sheet.

to my original formula to work, easiest way would be to copy range O of schedule sheet and insert to range N . But the structure of the schedule sheet has to be this way.

Hope I explained it properly.
 
Upvote 0
Another guess is
Excel Formula:
=SUMPRODUCT(((Schedule!$M$5:$M$2316)+(Schedule!$O$5:$O$2316))*(Schedule!$D$5:$D$2316>=$B4)*(Schedule!$D$5:$D$2316<=EOMONTH($B4,0))*(Schedule!$G$5:$G$2316=P$3))
Dear Fluff

This is it. Thanks mate.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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