Hi Guys
I do Need your help regarding this problem
i had created a UDF (public) to read 2 values and it returns some calculated valuewhn i call this by a macro it works finePublic Function C(p1 As String, p2 As String) As Integer
Dim i, j As Integer
i = Val(p2)
Select Case p1
Case "A":
j = i * 2
Case "B":
j = i * 3
Case "C":
j = i * 4
Default:
j = 0
End Select
C = j
End Function
But whn i use it As a Formula in a particular cell like =Functionname(arg1,arg2)
in this case "=C(A2,B2)"
it returns an error
i'm attaching a file with it for ease
thanks in advance
Bookmarks