I'm trying to build formulas to calculate the amount of window casing required for separate conditions. Window casing can be applied to a window as a picture frame ie, casing goes on all 4 sides of the window. In another condition, a windowsill is installed, and the casing is only applied to 3 sides of the window, in this condition, the piece below the window sill is called either a sweep an apron. Typically window sizes are provided on the plans,so the worksheet is set up as shown below.
[TABLE="width: 811"]
<tbody>[TR]
[TD][/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Windows[/TD]
[TD]Sweep & Sill[/TD]
[TD]Units in assembly[/TD]
[TD]Mullion width(multiple wide units)[/TD]
[TD]Casing width[/TD]
[TD]Add waste to width[/TD]
[TD]Add waste to Height[/TD]
[TD]Casing per window[/TD]
[TD]Sill[/TD]
[TD]Sweep
Or Apron[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]Width[/TD]
[TD]Height[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]Win #1[/TD]
[TD]y[/TD]
[TD][/TD]
[TD][/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]=If formula[/TD]
[TD]=IF formula[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
in M25 the formula calculates the length of the piece needed to span the Window width:
=IF(E25="y",(H25+($H$2*2)+$I$2),IF(E25="",((H25+($H$2*2))*2))) this yields the value of 7 if the 1st condition is true, and 14 at the 2nd condition is true, which is correct.
Note that there is no 2nd argument, (,0) in either =if formula.
now in the same cell M25,I want to calculate the amount of casing required for the height of the windows using the formula below:
+((I25+Casingwidth+heightwaste)*2)
but when I add this formula to =IF formula above, to yeild:
IF(E25="y",(H25+($H$2*2)+$I$2),IF(E25="",((H25+($H$2*2))*2)))+((I25+Casingwidth+heightwaste)*2), the formula only returns the correct results for the "" argument, not the "y" argument.
I have tried several iterations to no avail:
=IF(E25="y",(H25+(I25*2)+(Casingwidth*2)+(widthwaste)+(heightwaste))),IF(E25="",(I25*2)+(H25*2)+(Casingwidth*2)+(widthwaste)+(heightwaste),0)---#VALUE
=IF(E25="y",(H25+($H$2*2)+$I$2),IF(E25="",(I25*2)+(($H$2*2)+$I$2),0))+((I25+$J$2)*2)
It seems as though I have used=IF formulas in the past, and gotten the 2nd part of the formula (in this case the length of trim required for the window height) to interface with the results of the=IF, argument whether true or false.
I have also tried adding the measurement for height, to each=IF formula, separated a comma,in various parentheses arrangements. No luck.
But I am stuck. I can't figure this out. I wasted my whole day on this. Please help
[TABLE="width: 811"]
<tbody>[TR]
[TD][/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Windows[/TD]
[TD]Sweep & Sill[/TD]
[TD]Units in assembly[/TD]
[TD]Mullion width(multiple wide units)[/TD]
[TD]Casing width[/TD]
[TD]Add waste to width[/TD]
[TD]Add waste to Height[/TD]
[TD]Casing per window[/TD]
[TD]Sill[/TD]
[TD]Sweep
Or Apron[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD]Width[/TD]
[TD]Height[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD]Win #1[/TD]
[TD]y[/TD]
[TD][/TD]
[TD][/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]=If formula[/TD]
[TD]=IF formula[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
in M25 the formula calculates the length of the piece needed to span the Window width:
=IF(E25="y",(H25+($H$2*2)+$I$2),IF(E25="",((H25+($H$2*2))*2))) this yields the value of 7 if the 1st condition is true, and 14 at the 2nd condition is true, which is correct.
Note that there is no 2nd argument, (,0) in either =if formula.
now in the same cell M25,I want to calculate the amount of casing required for the height of the windows using the formula below:
+((I25+Casingwidth+heightwaste)*2)
but when I add this formula to =IF formula above, to yeild:
IF(E25="y",(H25+($H$2*2)+$I$2),IF(E25="",((H25+($H$2*2))*2)))+((I25+Casingwidth+heightwaste)*2), the formula only returns the correct results for the "" argument, not the "y" argument.
I have tried several iterations to no avail:
=IF(E25="y",(H25+(I25*2)+(Casingwidth*2)+(widthwaste)+(heightwaste))),IF(E25="",(I25*2)+(H25*2)+(Casingwidth*2)+(widthwaste)+(heightwaste),0)---#VALUE
=IF(E25="y",(H25+($H$2*2)+$I$2),IF(E25="",(I25*2)+(($H$2*2)+$I$2),0))+((I25+$J$2)*2)
It seems as though I have used=IF formulas in the past, and gotten the 2nd part of the formula (in this case the length of trim required for the window height) to interface with the results of the=IF, argument whether true or false.
I have also tried adding the measurement for height, to each=IF formula, separated a comma,in various parentheses arrangements. No luck.
But I am stuck. I can't figure this out. I wasted my whole day on this. Please help