View Single Post
 
Old 10-27-2017, 07:41 AM
SerenityNetworks SerenityNetworks is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: May 2005
Location: Allen, Texas, USA
Posts: 37
SerenityNetworks
Question Worksheet function returns "Invalid or Unqualified Reference"

I'm trying to use the BINOMDIST function in a UDF. I'm at a loss as to why it won't calculate. If I enter the formula =BINOMDIST(3,551,0.01,TRUE) in a worksheet then it correctly returns 0.199. When I try to use the same in a UDF it doesn't work. What am I doing wrong?

Thanks,
Andrew

Code:
Sub TestIt()
    Dim cdf As Double
    cdf = .BinomDist(3, 551, 0.01, True)
    Debug.Print cdf
End Sub
Reply With Quote