A bit stumped on this one, although I feel like it's probably just a basic combination of sumproduct, VLOOKUP, index or something else that likely can make this quite easy. Although I could be wrong. The situation is pretty straight forward:
I have a chart that lists out different flavors of cookies on column A and then ingredients listed across row 1. It's a table that just allows each product to list out the quantity used for each ingredient. So for instance, on the column A, there might be 3 different types of chocolate. 1) Chocolate 2) Double Chocolate 3) Triple Chocolate. The normal chocolate uses 10g cocoa, double 20g, triple 30g. I have a table like this.
Then for the production ledger for the day, I want to be able to list out the different quantities of cookies we made and let the formula just total the total cocoa used. So if we made 3 normal chocolate (30g), 2 double (60g), and 1 triple (30g) that's a total of 120g consumed.
I was doing this manually previously for a while by just adding a new ingredient and then manually doing a formula such as:
=SUMIF ( Production Ledger'!A:A , Production Ledger'!A3 (cookie being made), Production Ledger'!B:B) <--- gives cookie type quantity * SUMIF( 'Recipe Quantity'!A:A, 'Production Ledger'!A3, 'Recipe Quantity'!B:B)<-- cocoa per cookie
SUMIF ( Production Ledger'!A:A , Production Ledger'!A4, Production Ledger'!B:B) * SUMIF( 'Recipe Quantity'!A:A, 'Production Ledger'!A4, 'Recipe Quantity'!B:B)
SUMIF ( Production Ledger'!A:A , Production Ledger'!A5, Production Ledger'!B:B) * SUMIF( 'Recipe Quantity'!A:A, 'Production Ledger'!A4, 'Recipe Quantity'!B:B)
So then I just end up with an incredibly long formula but it gets the job done. But it's become unsustainable. Any help?
I have a chart that lists out different flavors of cookies on column A and then ingredients listed across row 1. It's a table that just allows each product to list out the quantity used for each ingredient. So for instance, on the column A, there might be 3 different types of chocolate. 1) Chocolate 2) Double Chocolate 3) Triple Chocolate. The normal chocolate uses 10g cocoa, double 20g, triple 30g. I have a table like this.
A- (Recipe Quantity) | B | C | D |
Cocoa | Vanilla | Strawberry | |
Chocolate | 10 | - | - |
Double Chocolate | 20 | - | - |
Triple Chocolate | 30 | - | - |
Then for the production ledger for the day, I want to be able to list out the different quantities of cookies we made and let the formula just total the total cocoa used. So if we made 3 normal chocolate (30g), 2 double (60g), and 1 triple (30g) that's a total of 120g consumed.
Production Ledger | Quantity |
Chocolate | 3 |
Double Chocolate | 2 |
Triple Chocolate | 1 |
I was doing this manually previously for a while by just adding a new ingredient and then manually doing a formula such as:
=SUMIF ( Production Ledger'!A:A , Production Ledger'!A3 (cookie being made), Production Ledger'!B:B) <--- gives cookie type quantity * SUMIF( 'Recipe Quantity'!A:A, 'Production Ledger'!A3, 'Recipe Quantity'!B:B)<-- cocoa per cookie
SUMIF ( Production Ledger'!A:A , Production Ledger'!A4, Production Ledger'!B:B) * SUMIF( 'Recipe Quantity'!A:A, 'Production Ledger'!A4, 'Recipe Quantity'!B:B)
SUMIF ( Production Ledger'!A:A , Production Ledger'!A5, Production Ledger'!B:B) * SUMIF( 'Recipe Quantity'!A:A, 'Production Ledger'!A4, 'Recipe Quantity'!B:B)
So then I just end up with an incredibly long formula but it gets the job done. But it's become unsustainable. Any help?
Last edited: