View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
emsfeld[_3_] emsfeld[_3_] is offline
external usenet poster
 
Posts: 1
Default Randomize three variables subject to sum always equal to 1

Hi guys

I need a hand on this one, cuz I have absolutely no clue:

I need a code that randomly selects three real numbers between 0 and
and assigns these to three variables. I defined the variables as w(0)
w(1), w(2). The problem is that the sum has to equal 1! Always! S
that:

w(0) + w(1) + w(2) = 1

Help is very much appreciated!!!

Thanks

Emsfel

--
Message posted from http://www.ExcelForum.com