Sumproduct for multiple tables

Daw12

New Member
Joined
Aug 6, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I require a formula to Sum the total amount of parts produced within a certain date range for the specified product. My problem is that the data range spans what effectively is multiple tables.
In the example below I can easily do this for a single shift using a Sumproduct formula, but how can I make the formula work so it searches over multiple days/shifts?

=SUMPRODUCT(((S4<=D1:E1)*(T4>=D1:E1))*(D6:E8=N4)*E6:E8)

1628249911338.png


Any help would be greatly appreciated, I have spent a few days looking for a solution but to no avail.

Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Couldn't you just add two more sumproduct formulas to cell P4 as follows:

Excel Formula:
=SUMPRODUCT(((S4<=D1:E1)*(T4>=D1:E1))*(D6:D8=N4)*E6:E8)+SUMPRODUCT(((S4<=G1:H1)*(T4>=G1:H1))*(G6:G8=N4)*H6:H8)+SUMPRODUCT(((S4<=J1:K1)*(T4>=J1:K1))*(J6:J8=N4)*K6:K8)
 
Upvote 0
Unfortunately I can't, as in the real spreadsheet this would be done for entire year. The above is just a small portion of the spreadsheet where I am testing.
 
Upvote 0
After a lot of trial and error I have managed to find a formula that works.

Excel Formula:
{=SUM(IFERROR(((S4<=D1:K1)*(T4>=D1:K1))*(D6:J8=N4)*E6:K8,0))}
 
Upvote 0
Solution

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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