This user defined function calculates some value; according to that I need to return a string in the calling cell.
The MsgBox test in the function works, but in the cell I am getting only a #value!
error.
Why?
Function WoodClassify(Length As Double, Girth As Double, Description As String) As Double
Dim cubicMeter As Double
Dim Classification As String
If Length > 250 Then
MsgBox ("TG B(I)")
Classification = "TG B(I)"
ElseIf Length > 100 Then
Classification = "XXXXXXX"
Else
Classification = "WWWWWWWW"
End If
WoodClassify = Classification
End Function