RAND / RANDARRAY with manual Seed?

RAND / RANDARRAY with manual Seed?
0

Upvotes

Upvote

 Feb 08 2023
0 Comments 
New

It'd be great if there was a way to manually set the seed value for the RANDARRAY (and to a far lesser degree, RAND) functions. Both use the Mersenne Twister, so manually passing on a seed value should be a relatively simple excercise.

 

As the functions are "volatile" whereas one with a manual seed would not be, the functionality would probably need to move to its own function (e.g. PSEUDORANDARRAY.SEED).

 

In order to avoid unintentional lack of randomness, it might make sense to add the option to augment the seed with a unique value for each time the function is used. This can be implemented by just blending the seed with row, column and worksheet number of the respective cell.

 

I've built myself such a function (Lehner generator though), but I'm hitting the recursion limit of LAMBDA at inacceptably low numbers of pseudo-randomnumbers.