Sum Material Based on Different Criteria

nathanthomson11

New Member
Joined
Apr 4, 2019
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Unfortunately the office restricts my ability to upload a file so I'll do my best to explain what I'm looking for based on the attached image.

What I am trying to do is sum in table #3 based on information from Table #1 & Table #2. For example, in C13 I want to sum the quantity of "Ford" product being build in that particular week which is displayed in Table 2 but shown in specific dates, not weeks. However, in order to know what material in Table #2 is "Ford", it also needs to reference Table #1 to see what material number belongs to "Ford". The total in C13 should be 1,000 - The Ford material is 10001 & 10005 but 10001 is built in cw18 (202118) and 10005 is built in cw19 (202119).

Apologies again that I am only able to provide a screenshot..
 

Attachments

  • Capture_003.JPG
    Capture_003.JPG
    76.5 KB · Views: 22

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Here's one way that comes to mind.
Excel Formula:
=SUMPRODUCT(INDEX($F$3:$K$9,0,MATCH(C$12,$F$2:$K$2,0))*($E$3:$E$9=TRANSPOSE(IF($B$3:$B$9=$B13,$C$3:$C$9))))
 
Upvote 0
I'll give it some thought but I don't think that it's going to work with that layout. The dates in table 2 are not directly comparable to the year / week number headings in table 3. I suspect that there are to many details to cross reference in a single formula.
 
Upvote 0
This works on my test, but may not work with your sheet due to a couple of unknown factors.
As you've cut off the grid references from the second image, I've had to assume the same ranges as the first one.
There is nothing in your posts to identify your method of week numbering so default has been used.
Excel Formula:
=SUMPRODUCT(IF(XLOOKUP($E$3:$E$9,$C$3:$C$9,$B$3:$B$9,"")=$B13,$G$3:$G$9),--(VALUE(YEAR($F$3:$F$9)&WEEKNUM(INDEX($F$3:$F$9,ROW($F$3:$F$9)-ROW($F$3)+1)))=C$12))
There may be other problems that I have not thought of.
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,122
Members
452,545
Latest member
boybenqn

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