Generate random numbers

I have a 30 x 1 table (c x r).

 

I need a macro or a formula to generate values 0, 1 or 2 in a cell.

BUT, only six of them need to be zeroes, others (ones and twos) can be distributed randomly across the other 24 columns. The six zeroes also shouldn’t be consecutive.

 

Thanks.

By: Boki

Leave a Reply

Your email address will not be published. Required fields are marked *