# Recipe Calculator

#### jem10660

##### New Member
Hi Everyone

I'm trying to develop a recipe calculator linked to a product inventory like in the tables below, however my formula and function skills are limited but aspirational .

In the first table I want to list the ingredients that I buy, amount I bought, cost, price per unit. I then want to link the inventory table to a recipe calculator. I want to be able to type in a product from the inventory such as sugar in column e, the amount I used in the recipe in column f and in column g I want it to find the item from the first table and apply the price per unit from column d, multiply the amount used to give me the cost price in the recipe.

Can anyone help me with this? Its driving me insane.

 a b c d sugar 1000 9.52 0.00952 flour 2000 5.65 0.002825

<tbody>
</tbody>

 e f g h Product used amount cost

<tbody>
</tbody>

#### Dryver14

##### Well-known Member
Sheet16

 A B C D E F G 1 Product Total Buy Cost Cost per unit Product Used Amount used Cost 2 sugar 1000 9.52 0.00952 sugar 5 0.0476 3 Flour 2000 5.65 0.002825 4

<colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 86px;"><col style="width: 89px;"><col style="width: 90px;"><col style="width: 64px;"></colgroup><tbody>
</tbody>

 Cell Formula G2 =VLOOKUP(E2,\$A\$2:\$D\$3,4,0)*F2

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web >> Excel Jeanie HTML 4

#### jem10660

##### New Member
Thank you so much

#### Dryver14

##### Well-known Member
No problem,obviously extend the lookup range according to your sheet

#### jem10660

##### New Member
Hello Me again

The formula is working great for items such as sugar, but if the item is more than one word such as tapioca starch is can't find the value. Is there anyway of accounting for this in the formula?

#### Dryver14

##### Well-known Member
It should work for 2 words as long as they are in the same cell, the spelling needs to be identical

#### Dryver14

##### Well-known Member
If you know how to do data validation that is the best way to go by creating a dropdown list of the names in the first column, that way you will always get the correct spelling

#### jem10660

##### New Member
It isn't working with two words but as you say they would have to be exact. I'll give the data validation dropdown a go. Thanks.

1,081,690
Messages
5,360,614
Members
400,592
Latest member

### This Week's Hot Topics

• VBA (Userform)
Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
• List box that changes fill color
Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
• Remove duplicates and retain one. Cross-linked cases
Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
• VBA Copy and Paste With Duplicates
Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
• Macro
is it possible for a macro to run if the active cell value is different to the value above it
• IF DATE and TIME
I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...