View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default Generate column of 1's and 0's randomly

In column A:
=RANDBETWEEN(1,100)

Fill down as far as needed

In column B:
=IF(RIGHT(A1,1)"8",0,1) (of course "8" can be something else)

Fill down

--
Kind regards,

Niek Otten

"Ian Engelbrecht" wrote in message ...
Hi all, I would like to add a column to my spreadsheet with randomly
generated 1's and 0's. I would like to be able to set the probability with
which these are generated, eg each time the number is generated there is a
20% probability that it will be 1, and 80% that it will be zero. Would
appreciate it STACKS if someone could help me out!