View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Random numbers to make a known amount

First, a maximum of 9 of the numbers can be random. The 10th number (at
least) will necessarily be determined by 100 minus the sum of the others.

Second, if you're only including non-negative numbers, this will work,
though you're likely to get lots of zeros:

A1: =INT(RAND()*$A$11)
A2: =INT(RAND()*($A$11-SUM(A$1:A1)+1))

copy A2 down to A9

A10: =$A$11-SUM($A$1:$A$9)

If you allow negative numbers, the formula can get a bit more
complicated. If you want a more uniform distribution, you'll have to
specify how non-random you want it.


In article ,
Smeeg wrote:

Hi there,

In cell A11 I have the value 100

Is there a formula I can put in A1:10 which has random numbers in it
(to 2 decimal places) which totals 100?

Thanks,

AJ