View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
מיכאל (מיקי) אבידן מיכאל (מיקי) אבידן is offline
external usenet poster
 
Posts: 561
Default Generate random sequence based on probability

Assuming the list is in A1:A20 - In cell C1 type:
=INDEX($A$1:$A$20,MATCH(LARGE($B$1:$B$20,ROW()),$B $1:$B$20,))
and copy down to C20
Micky


"James R" wrote:

I have a list of events and the probability that each will happen. Example:
Event A 12%
Event B 20%
Event C 2% ...and so on.
My list is about 20 entries long. What I want to do is to have Excel
randomly determine what event will happen in what order, based on the
percentage chance that it will happen. So I want 20 cells in another column
with the results looking something like this:
Event K
Event B ...and so on. And be able to recalculate upon refresh.

Thanks in advance!!