I am running a experiment in excel using NORM.S.INV(RAND())
Is there a way to set the seed for the random function?
I am running a experiment in excel using NORM.S.INV(RAND())
Is there a way to set the seed for the random function?
I found I needed persisted random numbers all the time. Turns out this is possible using only standard spreadsheet formulas.
One way is to use the so called Lehmer random number method. It generates a sequence of random numbers in your spreadsheet that stays the same until you change the "seed number", a number you choose yourself and will recreate a different random sequence for each seed number you choose.
The short version:
=MOD(48271*B1,2^31-1)
, this will generate the first random number of your sequence.That's it! If you want a different set of numbers, just change the seed number in B1. If you ever want to recreate the same set of numbers again, just use the same seed and the same random sequence will appear.
More details in this tutorial: How to generate random numbers that don't change in Excel and Google Sheets