I have been trying to solve this for about a month and cannot seem to figured this out. I have two tabs of data that are being referenced to generate an overall final sum of material needed on a dashboard. Currently the only way I can do this is very messy nested sumifs and it breaks when moving across the column
I am looking for the total qty of material within a month, filtered by customer, and multiplied against a percentage that is specific to item and material
The material data is as below, looking to only get the 2nd range(red/orange) as its the calculated fields based off the input in first, by column.
Essentially I need to sum all the quantities in a given column that meet a specific criteria, and then multiply that by the percentage on a table determined via lookup criteria
I have tried multiple sumproducts and index/match to no avail
lookup table
Calculation
I am looking for the total qty of material within a month, filtered by customer, and multiplied against a percentage that is specific to item and material
The material data is as below, looking to only get the 2nd range(red/orange) as its the calculated fields based off the input in first, by column.
Example.xlsx | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | AG | AH | AI | AJ | AK | AL | AM | AN | AO | AP | AQ | AR | |||||||||||||||
3 | 2022 | Units | Total Sheets (Premium + Regular) | |||||||||||||||||||||||||||||||||||||||||||
4 | Customer | Project Code | PSD | QTY | SKU | Reg. Material /SKU | Prem. Material/SKU | Applique /SKU | Jan-22 | Feb-22 | #### | Apr-22 | #### | Jun-22 | Jul-22 | #### | #### | Oct-22 | #### | #### | JAN | FEB | MAR | APR | MAY | JUN | JUL | AUG | SEP | OCT | NOV | DEC | ||||||||||||||
5 | Customer1 | PR1 | 14-Jan-22 | 925,000 | Item1 | 1.19 | 0.02 | 1.19 | 925,000 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,115,729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||
6 | Customer2 | PR1 | 21-Jan-22 | 315,408 | Item2 | 1.84 | 0.42 | 0.26 | 315,408 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 713,043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||
7 | Customer3 | PR1 | ####### | 378,900 | Item3 | 0.35 | 0.02 | 0.01 | 378,900 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 137,036 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||
8 | Customer4 | PR2 | 21-Jan-22 | 52,560 | Item1 | 1.19 | 0.02 | 1.19 | 52,560 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63,398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||
Plan |
Cell Formulas | ||
---|---|---|
Range | Formula | |
I5:I8 | I5 | =IF(AND($C5<=DATE(2022,1,31),$C5>=DATE(2022,1,1)),$D5,) |
J5:J8 | J5 | =IF(AND($C5<=DATE(2022,2,28),$C5>=DATE(2022,2,1)),$D5,) |
K5:K8 | K5 | =IF(AND($C5<=DATE(2022,3,31),$C5>=DATE(2022,3,1)),$D5,) |
L5:L8 | L5 | =IF(AND($C5<=DATE(2022,4,31),$C5>=DATE(2022,4,1)),$D5,) |
M5:M8 | M5 | =IF(AND($C5<=DATE(2022,5,31),$C5>=DATE(2022,5,1)),$D5,) |
N5:N8 | N5 | =IF(AND($C5<=DATE(2022,6,31),$C5>=DATE(2022,6,1)),$D5,) |
O5:O8 | O5 | =IF(AND($C5<=DATE(2022,7,31),$C5>=DATE(2022,7,1)),$D5,) |
P5:P8 | P5 | =IF(AND($C5<=DATE(2022,8,31),$C5>=DATE(2022,8,1)),$D5,) |
Q5:Q8 | Q5 | =IF(AND($C5<=DATE(2022,9,31),$C5>=DATE(2022,9,1)),$D5,) |
R5:R8 | R5 | =IF(AND($C5<=DATE(2022,10,31),$C5>=DATE(2022,10,1)),$D5,) |
S5:S8 | S5 | =IF(AND($C5<=DATE(2022,11,31),$C5>=DATE(2022,11,1)),$D5,) |
T5:T8 | T5 | =IF(AND($C5<=DATE(2022,12,31),$C5>=DATE(2022,12,1)),$D5,) |
AG5:AR8 | AG5 | =+(I5*$F5)+(I5*$G5) |
Essentially I need to sum all the quantities in a given column that meet a specific criteria, and then multiply that by the percentage on a table determined via lookup criteria
I have tried multiple sumproducts and index/match to no avail
lookup table
Example.xlsx | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | Item1 | Item2 | Item3 | Item4 | Item5 | Item6 | Item7 | Item8 | Item9 | Item10 | Item11 | Item12 | |||
2 | Material1 | 70.8% | 73.9% | 8.1% | 2.4% | 0.0% | 70.3% | 73.9% | 46.7% | 81.2% | 96.8% | 36.1% | 69.4% | ||
3 | Material2 | 9.4% | 2.4% | 25.5% | 96.9% | 86.7% | 9.0% | 8.3% | 33.2% | 10.5% | 0.0% | 18.1% | 8.9% | ||
4 | Material3 | ||||||||||||||
5 | Material4 | 10.8% | 7.7% | 46.2% | 0.0% | 1.8% | 11.2% | 12.2% | 7.1% | 2.4% | 3.2% | 13.9% | 15.7% | ||
6 | Material5 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.1% | 0.0% | 0.0% | 6.9% | 0.4% | ||
7 | Material6 | 4.9% | 3.8% | 0.0% | 0.7% | 10.6% | 5.7% | 5.6% | 4.3% | 5.9% | 0.0% | 25.0% | 5.2% | ||
8 | Material7 | 0.0% | 9.5% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 8.6% | 0.0% | 0.0% | 0.0% | 0.0% | ||
9 | Material8 | 4.1% | 2.8% | 20.2% | 0.0% | 0.0% | 3.6% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.4% | ||
10 | Material9 | 0.0% | 0.0% | 0.0% | 0.0% | 0.9% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | |||
11 | |||||||||||||||
12 | Item1 | Item2 | Item3 | Item4 | Item5 | Item6 | Item7 | Item8 | Item9 | Item10 | Item11 | Item12 | |||
13 | Material11 | 98% | 98% | 98% | 98% | 98.5% | 98% | 98% | 99% | 98% | 100% | ||||
14 | Material12 | 1.1% | 1.1% | 1.5% | 1.5% | 1.5% | 1.5% | 1.1% | 0.8% | 1.1% | 1 | 1 | |||
15 | Material13 | 1.4% | 1.4% | 1.4% | 0.3% | ||||||||||
List |
Calculation
Example.xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Calculation section | |||||
2 | ||||||
3 | Units | |||||
4 | JAN | FEB | ||||
5 | Order 1 | |||||
6 | Material1 | 105,320.63 | - | |||
7 | Material2 | - | - | |||
8 | Material3 | 120,147.12 | - | |||
9 | Material4 | - | - | |||
10 | Material5 | 54,900.86 | - | |||
11 | Material6 | - | - | |||
12 | Material7 | 45,601.24 | - | |||
13 | Material8 | - | - | |||
Overview |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C6:D13 | C6 | =SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item1")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item1"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item2")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item2"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item3")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item3"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item4")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item4"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item5")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item5"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item6")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item6"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item7")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item7"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item8")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item8"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item9")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item9"},cust1[#Headers],0)) +SUMIFS(Plan!AG:AG,Plan!$A:$A,"customer1",Plan!$E:$E,"item10")*INDEX(cust1,MATCH($B6,List!$A:$A,0),MATCH({"item10"},cust1[#Headers],0)) |