Hi guys,
Can anyone see any possible issues with the following UDF?
It should be used to calculate the flow rate of gas in a pipeline. However, it is just returning #VALUE!
Any ideas?
Thanks
Can anyone see any possible issues with the following UDF?
Code:
Public Function Vel(Pressure As Double, Flow As Double, Diameter As Double) As Double
Dim z As Double
Dim Area As Double
Area = (Pi * (Diameter / 2) ^ 2) / 1000
z = 1 - 0.00248 * (Pressure + 1.01325)
Vel = Flow * 1000000 / 86400 / Area * (1.01325 / (Pressure + 1.01325)) * z / 0.99978
End Function
It should be used to calculate the flow rate of gas in a pipeline. However, it is just returning #VALUE!
Any ideas?
Thanks