I'm trying to work in VBA to pull data and run a calculation based on a selection. I'm using getbeta to retrieve the calculation based on the selection and a function to run the calculation. This is what I've written that gives me a null value: Function GetBeta(FA As Double, SoilType As String) As Double 'Calculate the Beta Coefficient based on Friction Angle and Soil Type Select Case SoilType Case SoilType Is "Clay" Select Case FA 'Use Clay Curve Case Is < 25: GetBeta = 0.23 Case 25 To 34: GetBeta = GetBeta = 0.0147 * Exp(0.1101 * FA) Case Is > 34: GetBeta = 0.5 End Select End Function
Solved by Z. L. in 22 mins