Formula for a random +/- 20 % off the cost everytime i press F9 PLZ:)


Posted by Tim Dawe Gold-Dragon-Imaginations on December 15, 2000 2:55 PM

Hi there,
i need a formula asap for this coloum.
Total Cost
80,025
103,075
225,342
113,205
30,448
126,526
105,216
87,871
510,077
392,266
274,165
72,022
175,768
239,340
1,344,014
291,478
352,148
171,769
102,619
7,568
9,015
12,561
36,442
36,395
34,403
0
50,085
8,045
0
0
6,901
19,237
33,439
99,242
30,879
13,969
33,018
60,529
226,607
222,331
0
86,059
4,442
0
0
0
Total Cost
5,828,543
So when i hit F9 to calc it randomly makes either a +/- of anything between 20% off that score,

If someone can make the first bit of teh foumula ( as i still cant do it ) it will help:)
Ta



Posted by Tim Francis-Wright on December 15, 2000 4:57 PM

I'm not really sure what you want here, but I'm
guessing that you want each of the components
of the total to vary by up to 20%.

If a component amount is in, say, cell A3,
then B3 can be =A3*(0.8 + (rand()*.4))
[or INT(A3*(0.8 + (rand()* .4))), if you
want only integral answers].

If you have the Analysis Tool-Pak installed,
and you want only integer results, then
B3 can be =RANDBETWEEN(A3*0.8,A3*1.2)

Hope this helps.