SumProduct within date range with two worksheets

BrutalDawg

New Member
Joined
Jun 10, 2015
Messages
41
I am having trouble creating a viable formula that will sum the product found on the sheet1 within a certain date range.

I would like to enable it as a vlookup. Essentially, look for item one sheet1, and total sum within the month.

Similar to below.

Sheet1:
LocationIssueSIItemTimeQtyWhen
Ohio4/10/2018 123Firm104/9/2018
Ohio4/10/2018 321Firm104/9/2018
Ohio4/10/2018 567Firm104/9/2018
Ind4/10/2018 123Firm154/16/2018
Ind4/10/2018 321Firm154/16/2018
Ind4/10/2018 567Firm154/16/2018
NO4/10/2018 123Forecast105/1/2018
NO4/10/2018 321Forecast105/1/2018
NO4/10/2018 567Forecast105/1/2018

<colgroup><col><col><col span="2"><col><col><col></colgroup><tbody>
</tbody>

Sheet2 with desired results:

ItemAprilMayJuneJul
123251000
321251000
567251000

<colgroup><col><col><col span="2"><col></colgroup><tbody>
</tbody>

formula in sheet 2 for apr,may,jun etc. would look for corresponding item on sheet1, and total the qty within that particular month.

Thanks for any help or suggestions
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Your output is not consistent You have April May June and Jul. There is no month called Jul. It's July.
Make your data consistent or this will not work.

With Sheet2 Column A containing Item numbers and Sheet2 row 1 contaning month names try

Im assuming Sheet1 Column D is Item and you have no SI data in column C, thats what it looks like

in Sheet2!B2
=SUMPRODUCT((Sheet1!$D$1:$D$1000=Sheet2!$A2)*(TEXT(Sheet1!$B$1:$B$1000,"mmmm")=Sheet2!B$1)*(Sheet1!$F$1:$F$1000))
copy across and down
 
Last edited:
Upvote 0
Your output is not consistent You have April May June and Jul. There is no month called Jul. It's July.
Make your data consistent or this will not work.

With Sheet2 Column A containing Item numbers and Sheet2 row 1 contaning month names try

Im assuming Sheet1 Column D is Item and you have no SI data in column C, thats what it looks like

in Sheet2!B2
=SUMPRODUCT((Sheet1!$D$1:$D$1000=Sheet2!$A2)*(TEXT(Sheet1!$B$1:$B$1000,"mmmm")=Sheet2!B$1)*(Sheet1!$F$1:$F$1000))
copy across and down
Thanks for your help but I kept receiving a data error. I am currently trying this formula.

=SUMIFS(edi!F:F,edi!G:G,">="&Sheet1!G1,edi!G:G,"<="&G2,edi!D:D,A2)

Where A2 is the item I am looking for, g1 and g2 are beginning and end dates of the month. ie g1-4/1/2018 g2-4/30/2018 which seems to give me my desired result, but when I try and drag through, it changes to H2&H3, I3&I4, and so on. Anyone know how to lock the row, but let the column move?
 
Upvote 0
Your dates may be a mixture of dates and text depending on the (as yet undivulged) error message

Anchor them with $ signs

=SUMIFS(edi!F:F,edi!G:G,">="&Sheet1!$G$1,edi!G:G,"<="&$G$2,edi!D:D,A2)
 
Last edited:
Upvote 0
Your dates may be a mixture of dates and text depending on the (as yet undivulged) error message

Anchor them with $ signs

=SUMIFS(edi!F:F,edi!G:G,">="&Sheet1!$G$1,edi!G:G,"<="&$G$2,edi!D:D,A2)

Thanks Special, I had been trying to lock before the sheet designation. You are correct.
 
Upvote 0

Forum statistics

Threads
1,215,537
Messages
6,125,390
Members
449,222
Latest member
taner zz

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