I don't know why this code returns #VALUE. Can you please help me?
Even I replaced the Do Until loop part with direct equation i.e. something like Nu_Hashmi = 5*Re but still having this #VALUE return from my function.
Function Nu_Hashmi(Re, Pr, Dh, Ah, Q, Tbulk)'Nusselt Correlation given at Empirical Nusselt Number Correlation for Single Phase Flow through a Plate Heat Exchanger 'Limitations: 500<Re<4500 ; 5.6<Pr<8.0 ; Chevron Angle = 45 tc = tcL_T(Tbulk) If (Re > 500 And Re < 4500) And (Pr > 5.6 And Pr < 8) Then C1 = 0.0566 p = 0.881 C3 = 1 / 3 Else Nu_Hashmi = "OoR" GoTo 10 End If Tsurf_temp = Tbulk * 1.1 Error = 10 Do Until Error < 0.001 Nu_Hashmi = C1 * Re ^ p * Pr ^ C3 * (my_pT(4, Tbulk) / my_pT(4, Tsurf_temp)) ^ 0.14 h = Nu_Hashmi * tc / Dh Tsurface = Q / h / Ah + Tbulk Error = Abs(Tsurface - Tsurf_temp) Tsurf_temp = Tsurface Loop 10 End Function