View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default generate a random number and use if function to generate new data

Try

=LOOKUP(RAND()*3,{0,1,2},{"spades";"clubs";"hearts "})

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"Dogdoc1142" wrote in message
...
I am trying to use the rand function to generate an interger between 0-3.
Depending on the result, I'm attempting to assign a text value i.e. if
rand()*3=1,"spades","clubs". The process will work only once. When I use
F9
to generate a new random number, the text value remains the same
regardless
of the new result for rand()*3. How do I get Excel to generate a new text
value, based on the new random number?