Generate column of 1's and 0's randomly

I

Ian Engelbrecht

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!
 
A

Ardus Petus

One way to do it would be to add a staging column containing formula =RAND()
On next column, enter formula =IF(A1>0.2;0;1)

HTH
 
G

Guest

Good call. I like it!

Andy.

Ardus Petus said:
One way to do it would be to add a staging column containing formula
=RAND()
On next column, enter formula =IF(A1>0.2;0;1)

HTH
 
N

Niek Otten

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
 
Top