Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Howdy;
I have the following UDF that keeps returning #value in the worksheet. When I debug, it appears to bring in the right values, and does the calcs, at least through the nSecondsPerDay. Help or guidance would be apprecicated. Regards Tim ----- Function MixVelocity2007(OilRate_mbd As Double, WaterRate_mbd As Double, _ GasRate_mscfd As Double, Pressure_psi As Double, Temperature_F As Double, _ PipeID_in As Double) As Double Dim nLiquidRate As Double Dim nGasRate As Double Dim nTempConversion As Double Dim nPipeIDArea As Double Dim nSecondsPerDay As Double nLiquidRate = (OilRate_mbd + WaterRate_mbd) * 5.6146 nGasRate = GasRate_mscfd * 1000 * (14.7 / Pressure_psi) nTempConversion = ((Temperature_F - 32) * (5 / 9) + 273.15) / 288.15 nPipeIDArea = (PipeID_in / 12) ^ 2 * 3.1415 / 4 nSecondsPerDay = 60 * 60 * 24 MixVelocity2007 = (nLiquidRate + (nGasRate * nTempConversion)) / _ (nPipeIDArea * nSecondsPerDay) End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UDF from Add-In returning #NAME | Excel Worksheet Functions | |||
Returning an age | Excel Discussion (Misc queries) | |||
Looking up a value and returning another | Excel Programming | |||
UDF returning #VALUE! why? | Excel Discussion (Misc queries) | |||
Need some help returning a value | Excel Worksheet Functions |