young engineer
Board Regular
- Joined
- Mar 3, 2009
- Messages
- 100
Hi All
i have programmed 4 equations into editor, to ultimatley work out a single answer. i want to link all the equation together so that in the worksheet all i have to do is input the 3 required variables and i can get a single final answer. I have included the code below:
Function brixcor(Brix As Double)
A = 0.006222
B = 0.00023725
C = -0.0000018165
D = 0.000000018906
E = 0.00002328
brixcor = A * Brix + B * Brix ^ 2 + C * Brix ^ 3 + D * Brix ^ 4 + E * Brix ^ 2
End Function
Function SG(dil)
SG = 1 + [(dil ^ 2 + 200 * dil) / 54000]
End Function
Function fruc(bxcorr2, angle1)
A = 52.5
B = 143.8
C = 50
fruc = ((A * bxcorr2) / B) - ((C * angle1) / B)
End Function
Bxcorr2 = brixcor * SG this is a cell calculation and not coded in.
Function Frucpurity(fruc, bxcorr2)
Frucpurity = (fruc / bxcorr2) * 100
End Function
Ultimatley would like to just input the fruc,bxcorr2, angle1 values and get the frucpurity as a percentage.
i have programmed 4 equations into editor, to ultimatley work out a single answer. i want to link all the equation together so that in the worksheet all i have to do is input the 3 required variables and i can get a single final answer. I have included the code below:
Function brixcor(Brix As Double)
A = 0.006222
B = 0.00023725
C = -0.0000018165
D = 0.000000018906
E = 0.00002328
brixcor = A * Brix + B * Brix ^ 2 + C * Brix ^ 3 + D * Brix ^ 4 + E * Brix ^ 2
End Function
Function SG(dil)
SG = 1 + [(dil ^ 2 + 200 * dil) / 54000]
End Function
Function fruc(bxcorr2, angle1)
A = 52.5
B = 143.8
C = 50
fruc = ((A * bxcorr2) / B) - ((C * angle1) / B)
End Function
Bxcorr2 = brixcor * SG this is a cell calculation and not coded in.
Function Frucpurity(fruc, bxcorr2)
Frucpurity = (fruc / bxcorr2) * 100
End Function
Ultimatley would like to just input the fruc,bxcorr2, angle1 values and get the frucpurity as a percentage.