![]() |
Normal Random Generator
Hi,
I am working on a simulation project in Excel/VBA and need to generate normal random variables by function Norminv. The compiler doesn't know this function. I guess that I have to select/add a certain Add-In to activate this function. Does anyone know which Add-In or how to use this function in VBA? Thanks Ming |
Normal Random Generator
Hi
you have to add a reference to the Analysis Toolpak add-in for this -- Regards Frank Kabel Frankfurt, Germany "miong" schrieb im Newsbeitrag ... Hi, I am working on a simulation project in Excel/VBA and need to generate normal random variables by function Norminv. The compiler doesn't know this function. I guess that I have to select/add a certain Add-In to activate this function. Does anyone know which Add-In or how to use this function in VBA? Thanks Ming |
Normal Random Generator
Ming -
I am working on a simulation project in Excel/VBA and need to generate normal random variables by function Norminv. The compiler doesn't know this function. I guess that I have to select/add a certain Add-In to activate this function. Does anyone know which Add-In or how to use this function in VBA? < Use the same approach you would use with any worksheet function in VBA: Result = Application.WorksheetFunction.Norminv(prob,mean,st dev) Be aware of numerical inaccuracies of Norminv in pre-2002 versions of Excel. - Mike Middleton, www.usfca.edu/~middleton |
Normal Random Generator
Michael R Middleton wrote:
Ming - I am working on a simulation project in Excel/VBA and need to generate normal random variables by function Norminv. The compiler doesn't know this function. I guess that I have to select/add a certain Add-In to activate this function. Does anyone know which Add-In or how to use this function in VBA? < Use the same approach you would use with any worksheet function in VBA: Result = Application.WorksheetFunction.Norminv(prob,mean,st dev) Be aware of numerical inaccuracies of Norminv in pre-2002 versions of Excel. Actually you need 2003 for this to be a reasonable RNG method. 2002 has a better inverse of NormSDist than previous versions, but NormSDist is still lousy in the tails till 2003. Jerry |
All times are GMT +1. The time now is 07:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com