0
I am trying to generate 5.000 random variables using these excel functions: normsinv(rand()). This is the code I wrote:
Dim r As Integer
r = 1
For r = 1 To 5001
.Cells(r + 1, 1) = Application.WorksheetFunction.NormSInv(Rnd())
r = r + 1
Next
However, when I execute nothing happens (but it does not accuse any error as well)... Could you please tell me what is wrong with the code?
Should it be
Rand()notRnd()? – DavidPostill – 2014-11-08T15:22:56.917VBA code instead of NORMSINV(RAND()) might also help you ... – DavidPostill – 2014-11-08T15:23:40.643
Generating random numbers with Excel – DavidPostill – 2014-11-08T15:31:13.500