Reputation: 41
From what I understand, there is no built-in function in Google Sheets that allows you to set a seed for RAND() or RANDBETWEEN().
My goal is to create a list of psuedo-random integers, within a range, using a function that will produce different (though, not necessarily unique) values based on:
I need it to produce the same value every time the function is run in a particular cell, with a particular seed.
What is the simplest way to achieve this, so that someone who isn't me and has no programming knowledge can easily use the formula in other cells, as they need to?
Upvotes: 4
Views: 6171
Reputation: 38121
Use VLOOKUP and ADDRESS
Create a simple table with two columns, one for a compound key made from the cell address and the "seed" the other for the "seudo-random integers" (SRI)
Sheet name: Table
Sheet content (for illustrative purposes):
| A | B |
1|key | SRI |
2|A1-1 | 1 |
3|A1-2 | 77 |
=VLOOKUP(ADDRESS(ROW(),COLUMN(),4,FALSE)&"-1",Table!A2:B,2,0)
Upvotes: 2