Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NormInv property of the Worksheet.

Status
Not open for further replies.

bontle01

Programmer
Oct 10, 2008
7
ZA

Hi there,

below is the code i use to get NormInv. The error i am getting is "Unable to get the NormInv property of the WorkSheet class.

Please help.

Sub NOrmInv()
Dim mean , StdDev as double
dblRandom = WorksheetFunction.NormInv(RandomNumbers, mean, StdDev)
end sub
 
Hi

Check ur code follows the rule.

NORMINV(p, mu, sigma)

where p, mu, and sigma are numeric values. Because p corresponds to a probability (see note 1), it must be greater than 0 and less than 1. Because sigma represents
standard deviation it must be greater than 0.

Regards,
Durai
 
Thanks,

Even if p>0, the problem is that the code does not recognise NormINv.

Masese
 
Have you tried this ?
dblRandom = Application.WorksheetFunction.NormInv(RandomNumbers, mean, StdDev)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Check the rest of your code. The error indicates that somewhere you try to get NormInv from WorkSheet instead of WorkSheetFunction class.
You could try to display all parameter values you try to pass to NormInv.
Try to compile the project.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top