Hi. I created my own UDF with the below code. Everytime I use the functions, like =Compare2Num(L5,N5), I get #NAME?. Can anybody help me pinpoint the issue? Thank you very much in advance.
Note : L5 and N5 can be decimal numbers like 1.8 and 0.779 respectively
Function Compare2Num(ByVal num1 As Variant, num2 As Variant) As String If (num1 < num2) Then Compare2Num = "<" ElseIf (num1 > num2) Then Compare2Num = ">" Else Compare2Num = "=" End If End Function
Bookmarks