Setting up formula with too many "ifs" for my brain.

kellywy

Board Regular
Joined
Aug 5, 2006
Messages
123
Hi again --

Formulating recipes - and trying to set up a table that will auto-convert from oz. to grams, based on an ingredient and the initial rate of measurement from a recipe. And my brain's having none of it. :( Here's what I have and what I need:

1) Column J6:J62 is a listing of Ingredients by name.

2) Column M6:M62 is a listing of the Grams equivalent for each ingredient by varying ounce/cup/tsp/T/ etc. measurements.

3) My calculating table is set up in A4:G20. Example:
a) A4 lists the ingredient name. (to match J6:J62 ingredient list)
b) B4 lists the quantity of measurement.
c) C4 lists the original recipe measurement type (Cups, Grams, tsp, etc.)
d) In D4 - I need to display the correct Grams for the recipe.

NOTE: Grams is the end-game. So, if C4 has the original recipe in Grams, I need D4 to just retain that number. But if C4 was in cups/tsp/etc. - I need to convert that to Grams.

Example 1:
A4 = "Flour"
B4 = 2.5
C4 = Cups
D4 = (needs to be the correct Grams measurement pulled from J6:J62 (ingredients) and M6:M62 (correct Gram conversion). That's M6:M62 Grams x B4 (Quantity of Measurement).

Example 2:
A4 = "Flour"
B4 = 240
C4 = Grams
D4 = (should remain 240 for Grams original measurement)

So far, everything I've tried has come up a bust. But if anyone has suggestions for the D4 formula, I'm all ears!

(And let me know if that all doesn't make sense....) Appreciate any assistance. Thank you!

Kelly
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
hmm doesn't seem to be a 'cup" to "gram" conversion :(

Do you have a conversion factor for each measure-to-grams? If so, you could make up a small table and use VLOOKUP(), then apply that factor to the volume?
 
Upvote 0
Hmm. No, I haven't, actually. But I'm not sure how that would work. Problem being that all ingredients have different weights (per the M6:M62 column), so I assumed that would be the only way to account for them accurately....?

Example: 1 cup of all-purpose flour = 120 grams; but 1 cup of hazelnut flour = 89 grams, 1 cup of unsweetened cocoa = 85 grams, etc. And the conversion rates will continue to be added to over time with new ingredients, etc. - so this list will just keep getting longer.

Is there a way to make that work?
 
Upvote 0
Unfortunately, VLOOKUP isn't my strong suit - and when I try to mix in the "if cups - convert to grams, but if grams, retain the number", that's when my brain starts smoking out the ears. ;)
 
Upvote 0
This is kinda what Im thinking of...
A​
B​
C​
D​
E​
F​
1​
all-purpose flour
120​
2​
blah 1
20​
hazelnut flour
89​
3​
blah 3
60​
unsweetened cocoa
85​
4​
hazelnut flour
89​
blah 1
20​
5​
blah 8
300​
blah 2
50​
6​
blah 3
60​
7​
blah 4
12​
8​
blah 5
55​
9​
blah 6
88​
10​
blah 7
99​
11​
blah 8
300​
Your "measures" will be in columns E:F, and you can add to that as needed.

A2 would be your "entry"
B2=IF(A2="","",VLOOKUP(A2,$E$1:$F$1000,2,0))
copied down

I have made allowances for the formula to look at 1000 rows of data in E and F, and you can expand that if needed
 
Upvote 0
Ford, a cup is a unit of volume, a gram is a unit of weight, so they don't convert directly. If you know the density of the substance you want to convert, you can do it, which is essentially what the conversion table is.

Kelly, if I understand your layout properly, it looks something like:

Excel 2012
ABCDEFGHIJKLM
1
2
3grams
4flour2.5cup300
5flour240gram240
6flour10tsp25flourcup120
7unsweetened cocoa5tsp8.854167saltcup273
8baking soda10tsp45.83333hazelnut flourcup89
90unsweetened cocoacup85
100baking sodacup220
11flourtsp2.5
12salttsp5.6875
13hazelnut flourtsp1.854167
14unsweetened cocoatsp1.770833
15baking sodatsp4.583333
16

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
D4{=IF(C4="gram",B4,INDEX($M$6:$M$62,MATCH(A4&"|"&C4,$J$6:$J$62&"|"&$K$6:$K$62,0))*B4)}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



The part I couldn't figure out is how to compare the unit you have in column C, with the ingredient in column J. In order to handle that, I added a column K. Once that's in place, the formula in D4 should work for you. Note that the unit must match, "cups" doesn't equal "cup". If you have a different way to match up the units, let us know.

Hope this helps!
 
Upvote 0
Ford, a cup is a unit of volume, a gram is a unit of weight, so they don't convert directly.
hmm yup, good point. Metric kinda gets around that, conversions between different media is simpler

That is why I went for a table and vlookup (like you did). I just didn't take it further and apply it to the "unit" qty ;)
 
Last edited:
Upvote 0
Thinking again, we would need to combine the product and measure, maybe in a helper, then vlookup on that?
 
Upvote 0
Hello Kellywy

This is quite a question you have posed for everyone and from your description of what you have, it sounds as if you have a very elaborate setup. I’m no expert on Excel, actually I’m trying to learn it, however, I think I have come up with an idea that I believe will give you what you are asking for and in a much simpler way. For example, you mentioned that you were using so many ‘IF’ statements that your ‘brain’s having none of it’. (I love your sense of humor) You may be interested to know that I’ve used only two ‘IF’ statements.

ON SHEET 1:

A B C D
1
2 ONE
3INGREDIENTQUANTITYUNIT SIZEGRAMS NEEDED
4All-purpose flour91gram91
5abc3CUP33
6ABC6tsp30
7Unsweetened cocoa0.5Cup42.5
8HazelNUT flouR0.75cuP66.75
9brown sugar1oz29

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>

<tbody>
</tbody>
<!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Version>14.00</o:Version> </o:DocumentProperties> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]-->
Above is where I set up what I believe you are calling your ‘Calculating table’ starting in A4. I kept the same row and column numbers as you mentioned. I designed everything so all you have to do is enter the data in Columns ‘A – B – C’. The formula in Column D does the conversion from the recipe units of measurement to grams.



Column D has the only formula and I designed it to allow for a great deal of expansion. You have room for up to 25 different units of measurement (See explanation for Sheet 3) and 1,000 different ingredients (See explanation for Sheet 2). One of the two ‘IF’ statements deal with your desire to have the value in Column B transferred to Column D if the recipe already used ‘GRAM’ as its unit of measurement. The other ‘IF’ statement keeps Column D clear if some rows are not used. I have entered a few random items to show that while correct spelling is important, upper/lower case text does not matter. Write the items in Column C in the singular, e.g. CUP and not CUPS.

After you are finished with one recipe and want to remove all the figures, clear the contents of Columns A, B, C, *WARNING* DO NOT do anything with Column D, As soon as any entry in Column A is erased, the corresponding entry in Column D will disappear. If you need to add more ingredients but nothing shows up in Column D, first copy the last cell from Column D down for as many rows as you need, and then enter the remaining ingredients.

Here is that magical formula that does everything from Column D. Copy it into D4. I wrote this to work from Sheet2 and Sheet3. If you wish to use your own names, carefully delete only the words ‘SHEET2’ and ‘SHEET3’ then substitute your names. Then delete the apostrophe at the beginning, and copy it down a few rows.

‘=IF(A4="","",IF(C4="GRAM",B4,VLOOKUP(A4,Sheet2!A$2:Z$1001,VLOOKUP(C4,Sheet3!A$2:B$1001,2,FALSE),FALSE)*B4))


ON SHEET 2:
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:EnableOpenTypeKerning/> <w:DontFlipMirrorIndents/> <w:OverrideTableStyleHps/> </w:Compatibility> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="--"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/> <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/> <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/> <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/> <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/> <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/> <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/> <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/> <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/> <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/> <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/> <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/> <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/> <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/> <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/> <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/> <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/> <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/> <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/> <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/> <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/> <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/> <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/> <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/> <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/> <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/> <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/> <w:LsdException Locked="false" Priority="37" Name="Bibliography"/> <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Arial","sans-serif"; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]-->
A B C
1
INGREDIENT GRAM/TSPGRAM/CUP
2All-purpose flour10120
3Hazelnut flour789
4Unsweetened cocoa3085
5ABC511
6DEF5105

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

The above table shows the number of grams per different units of measurement for varying ingredients. If you wish to add another INGREDIENT or add another unit of measurement, this is the first place to come to. If adding another INGREDIENT, fill in the next available row, or if you are adding a new measurement, go to the next available column and enter the information. The column headings are there only for documentation, and have no meaning as far as the formula in SHEET 1 is concerned. You can expand this table out to 25 columns of measurements (Column Z) and down to row 1001 without having to adjust the formula in COLUMN D from SHEET1).

For example, we’ll say you want to add Brown sugar to your list of INGREDIENTs. Type Brown sugar in ROW 6 and add the corresponding weights of GRAMS/TSP and GRAMS/CUP for Brown sugar. While you are here editing this table, we’ll assume you decide to add another column of GRAMS/OZ for each ingredient. You would put this data in the next available column, in this case COLUMN D. You do need to remember the name of the new INGREDIENT, and that the new column of GRAMS/OZ, (or whatever you called it) is Column 4 in order to complete the next and final step. Now proceed to Sheet 3.

ON SHEET 3:

A B
1 MEASURED UNIT
COLUMN #
2TSP
2
3CUP
3
4OZ4

<colgroup><col><col><col></colgroup><tbody>
</tbody>

Upon arriving here, type in the name of the new unit of measurement you entered the same way you typed it in the last table and also enter the number ‘4’, in COLUMN B. The purpose of this table is to tell the formula in SHEET1 what column to look at in the table from SHEET2, in order to get the correct number of GRAMS per whatever UNIT SIZE you specified in COLUMN B on SHEET1.

There should never be a need to add new columns here, but in keeping with the ability to increase the number of ROWS in the table on SHEET2; you may also extend this table down to row 1001 with no adjustment to the formula on SHEET1. It’s highly unlikely you would ever have that many UNITs OF MEASUREMENT to enter.

You have completed the process of entering any new INGREDIENTS and their corresponding weight. You may now return to SHEET1, at which point I STRONGLY recommend you save these changes you have made. You may now enter the INGREDIENT of Brown sugar in the normal manner.

If you had already tried to enter this item without realizing it was NOT part of SHEET2 and SHEET3, you would have received a #NA error message. If this is what happened, the #NA error message should now be gone and in its place the number of grams.

I hope this will be of some help to you. There is one more thing you can do if you decide this is something that you can use. When you bake your first cake or pie by using the information supplied from here, you can invite me over and together we’ll celebrate this programs initiation. Doesn’t that sound like a good idea? It does to me and my stomach thinks so also. HaHa.
 
Upvote 0

Forum statistics

Threads
1,215,584
Messages
6,125,666
Members
449,248
Latest member
wayneho98

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