View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme[_3_] Bernard Liengme[_3_] is offline
external usenet poster
 
Posts: 1,104
Default the formula for random selecting

=RANDBETWEEN(1,100) gives a random number in the range 1 to 100
so does
=RAND()*(100-1)+1
The former needs the Analysis Toolpac installed, the latter does not

=INDEX(A1:A100,RANDBETWEEN(1,100),1)
will randomly select an item (text or number) from a list in A1:A100

In all cases, for "random" read "quasi-random" in case there are purists
lurking <grin

For random numbers without duplicates see
http://www.tushar-mehta.com/excel/ne...ion/index.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Inquiring mind" <Inquiring wrote in message
...
I would like to know to setup my spreadsheet to randomly select from a
list
of text and also numbers. For instance, used in a drawing for contest.