PDA

View Full Version : program to pick random name out of a list of names


xpoint9
Nov 15th, 2006, 07:53 PM
hey does anyone here know of such a software? like enter 1000 different names and then run the program and will randomly select one name.

thanks.

Icedawn
Nov 15th, 2006, 09:06 PM
depending on why you need this, you should be easily able to use excel to make a quick macro that does this. that is, have an excel list of 1000 names, have the program randomly pick one...

would entail a little programming, don't know if you have a friend who's able to do this. if the guy knows VBA, would take literally 1 minute or less...

joshmxpx
Nov 16th, 2006, 06:58 AM
This can be done in excel very quickly, just have the 1000s names in cells, than have excel choose a random cell.

Traian2003
Nov 16th, 2006, 07:59 AM
Google pointed me to this:

1.Enter a list of names in column A

2.Now enter the formula below in the cell you want the random name returned.

=INDEX($A:$A,RANDBETWEEN(1,COUNTA($A:$A)),1)

This will pick a name at random from your list in column A. It will also be dynamic in that when/if you add/remove names from the list they will automatically be included/excluded.

If you have a table of data (more than 1 column) and you wish to select an item at random from the table, you could use:

=INDEX($A:$C,RANDBETWEEN(1,COUNTA($A2:$A65536)),RA NDBETWEEN(1,3))

This assumes your table 3 columns wide, hence; $A:$C and RANDBETWEEN(1,3) and we do not want row 1 includes as it contains headings, hence; COUNTA($A2:$A65536)

deep
Nov 16th, 2006, 08:50 AM
Or if you have the list of names already on paper, just use a random number generator to grab a # between 1 and 1000 and start counting down the list.