View Single Post
  #7   Report Post  
Sukhjeet
 
Posts: n/a
Default

Hi Bill
The method I proposed, of generating five random numbers, multiplying each
with the total required (100 in this case) and then dividing with the sum of
those five random numbers will result in a better randomisation than
generating 4 random numbers (between 1 and 20) and subtracting their sum from
100.
Ciao
Sukhjeet

"Bill Sharpe" wrote:

If the numbers must add to 100 the last number is not really random
because there's a constraint involved. Of course the RAND function
really gives you pseudo-random numbers anyway, good enough for most
practical purposes.

You can avoid getting a large number as the fifth number by changing the
upper limit of RANDBETWEEN to a number higher than 20. Using 20 as the
upper limit guarantees that the fifth number will always be 20 or
greater. Don't go too high or the fifth number will be too small
compared to the others. You'll have to experiment a bit.

Bill

"sara" wrote in message
...
Hi JuliD
tried that. works fine. but sometimes cell E1 displays number that is
too
large
from the rest of the cells. This is because the total is subtracted from
100.
I would prefer "evenly" distributed numbers. Are there any formulars to
do
that ?

"JulieD" wrote:

Hi

one option is in cells
A1:D1 use the formula
=RANDBETWEEN(1,20)
and in E1 use the formula
=100-SUM(A1:D1)

Cheers
JulieD

"sara" wrote in message
...
Hi.
It would help to know how I could
Fill up random numbers in say Cell A1 to E1
but the total of the random numbers should add up to say number 100
please help.