I have multiple "Mixes" that I want to create a cost for. Currently each mix is shown in component form in a cell for clarity, the number of units is in a separate column within the table and the cost per unit is broken out into individual components in a seperate sheet in the workbook.
Example On Sheet 1, I have the following: Cell C2 is "3" (# of units), C3 is "2" and C4 is "4". Cell D2 is "1 cup flour, .25 cup milk, 1 egg" Cell D3 is "2 cup flour, .33 cup oil, 2 egg" Cell D4 is "1 cup flour, 1 egg" I want column E to have a formula to calculate cost based on prices in sheet 2 that has cost for Flour in Cell B2 as ".05", cost for milk in Cell B3 as ".08", cost for egg in Cell B4 as ".10" and cost for oil as ".04". I also have a generic mixing cost of ".25" that I want to apply per unit that is not called out anywhere other than in Sheet 2 cell B16.
Currently I am manually configuring each formula in Column E which is time consuming and leads to the potential of error. An example of this for cell E2 is "=3*(1*.05+.25*.08+1*.1+.25)"
Two options I have thought of is to create a Mix Column that shows Mix 1, Mix 2 and Mix 3 that I then define a per unit cost that I can multiply by and create a unique mix for each combination (Currently around 15 Mixes and growing). Example Column F is the Mix Cost so the formula in E2 becomes "=C2*F2". My question is can I use a IF() Statement to populate this column automatically based on the data in Column D as I will want Column F hidden when printing data and it would also be easier to navigate the sheet if the column is hidden when entering data.
The other option is to create a formula that splits column D into individual components and then multiply using the individual values and then hide all of the individual column data and the formula would read something such as "=Units*(data point 1+data point 2+data point 3+mixing data point)". My concern with this approach is that when I calculate the mix values 3-4 times per Row and if I begin to have 5-6 ingredients the sheet will get very large and clumsy to navigate.
Any other ideas or approaches would be helpful.