SUMIF formula help

Jobb1Excel

New Member
Joined
Oct 17, 2023
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hey, i need some help with the SUMIF formula.
i got a sheet with product material numbers and i want to lookup the material numbers in a sales sheet.

Example:
1701942152769.png

The picture is from the sales sheet and lets say i want to look up "material nr 1" in the other sheet and criteria to be material nr 1 is a match and date is 4 weeks in the past - 2 weeks from today, so if those criterias is met then SUM all the QTY's found with that material number and those dates. So the output should be 200 in this example, but lets say the line with material nr 4 was material nr 1 then the output would have been 200 + 4 so "204".
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Im also looking for a formula that outputs every line that is a match and meet the criterias and the date
i will be using the same example as above.
Looking up "Material Nr 1"
1701942993134.png

Output:
1701942840845.png


this formula is for the same thing as above. So i get one cell with the total and then each order qty with the deliv date in the cells below the total cell.
 
Upvote 0
You could do something like:

Excel Formula:
=VSTACK(SUMIF(E:E,"Material Nr 1",G:G),FILTER(G:H,E:E="Material Nr 1"))

For future reference, it's a lot simpler for people to help if you post tables of data (eg using the XL2BB tool) rather than pictures.
 
Upvote 0
Hey, the "material nr 1" is just an example. "The material nr 1" is gonna be a cell reference to cell A2 in the main sheet (=A2). I would have been using XL2BB tool if i could, but it is not working for me.
 
Upvote 0
Then just replace "Material Nr 1" with A2 in the formula. ;)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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