View Single Post
  #2   Report Post  
Joe Smith03 Joe Smith03 is offline
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by Joe Smith03 View Post
Ive written a very basic UDF function to calculate 2 probabilities given several potential variables, but I keep receiving this error message and I am entirely stumped as to what to do. This is my first time using UDF, if someone could give me some pointers, I would greatly appreciate it. I have posted what I have written below.

Function PD(a As Variant, x As Variant, z As Variant)
PD = [a(1.00-x)] + [z(1.00-a)]
End Function
Function PS(a As Variant, x As Variant, z As Variant)
PS = (a * x) + [(1.00-a)*(1.00-z)]
End Function

But when I move to an excel sheet, and insert the respective equation, including telling the function which cells it should extract the variables from for the specific problem...I receive the error messagešValue!š

Help?


No? No one has any idea what I might be doing wrong? How disappointing. Ok.