View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default Random numbers but with a bias

On Wed, 15 Jul 2009 17:24:37 +0200, "nurrrthk"
wrote:

Hi,
I need to populate a test table with some random numbers.
Example : 0 or 1.
I fill in the table with "= Randbetween(0;1)" and that does the trick.

But now I need to bias the data so there is - for example -
twice a many chances of 0 than there is of 1.

How would I do that ?

TIA
Nurrrrthk


Try this formula:

=INT(RANDBETWEEN(0,2)/2)

Hope this helps / Lars-Åke