View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Random Name Generation

In a column, enter the names with the proper number of duplicates:

Adam
Bob
Bob
Charlie
Charlie
Charlie
..
..
..

In the next column enter:
=RAND() and copy down

Sort both columns by the second column. This will shuffle the names in the
first column. Pick the top name.

To pick another, just re-sort first. Entering Charlie three times will
triple the chances that he will be picked.
--
Gary's Student


"Fleone" wrote:

Hi everyone. I am trying to figure out a way to make a spreadsheet version of
pulling a name out of a hat.
I have a list of names, let's say Adam, Bob, and Charlie.
Adam has one slip of paper with his name on it, Bob has two, and Charlie has
three.
Adam 1
Bob 2
Charlie 3
I want to be able to maybe select a command button, or hit F9 to refresh the
page and have a random selection from the list appear based on the number of
entries that each person has. If my thinking is correct Charlie would be more
likely to have his name drawn than either Adam or Bob although the drawing
itself is random.
Thanks a bunch for any help.