Say I have three items, each with a designated frequency from 1-3, with 1 being 'Low' and 3 being 'High'.
Item A - 1
Item B - 2
Item C - 3
On recalculating the sheet, I want a cell to display a random one of those items, but according to their frequency.
(i.e. if I calculate 6 times, I would expect Item A to show up once, Item B to show up twice, Item C to show up thrice.)
Ideally, I'd also force the expected value each time by making the random numbers used unique (e.g. every number from 1-6 appears exactly once).
I have a working solution but it's terribly time-consuming to set up in future worksheets and I barely understand it looking back on the code - can anyone think of a neat way to do it?
(My solution involved summing the frequencies to establish boundaries for each item [e.g. Item C's boundaries would be 4-6] then comparing a random number to that boundary and searching for the appropriate item)