That appears to work nicely, except I changed it slightly to restrict the
first number to be positive; one of the rules of the game.
In the meanwhile, I had worked out a slightly different approach which also
fits the need, something like this:
A1 =RANDBETWEEN(1,10)
A2 =RANDBETWEEN(-1*A1,10)
A3 =RANDBETWEEN(-1*(A1+A2),10)
and so on.
"LanceB" wrote in message
...
How about this
in a1
=ROUND(RAND()*10,0)*IF(RAND()0.5,-1,1)
in a2
=IF(SUM($A$1:A1)10,ROUND(RAND()*10,0)*IF(RAND()0 .5,-1,1),ABS(SUM($A$1:A1))
+ROUND(RAND()*(10-ABS(SUM($A$1:A1))),0))
drag formula down for as many rows as you want for your sum
|