Iterations miscounting

J

JoeS01

In cell A1 I have a random number 1 -10. I have set the iterations to 1,
and manually hit F9 for the next iteration.

In cell A2, I have a circular operation to accumulate the values of the
random number on each iteration ie =A1+A2. This works OK for no. of of
iterations n=1

If I change the number of iterations in Tools/Option/Calculation to n=2
, say, then the new accumulated value in A2 actually becomes the
latest value in A1 (remaining after the 2 iterations) x 2 plus the
previous value in A2.

This rule applies for any vaule of n - i.e., value in A2 is previous
value +(n x A1)

Can anyone please advise what is going wrong with my approach? I am
using Excel 2003

My regards,
JoeS
 
E

Earl Kiosterud

Joe,

I'm not too clear on your objective. Keep in mind that for each iteration,
it will sum the current accumulation in A2 AND the value in A1. Not just
A1.

If you're trying to accumulate the value in A1 n times, perhaps you should
have another cell for the multiplier (n), and use one iteration.

A1: Multiplier
A2: Value
A3: =A1*A2 + A3
Iterations: 1

The problem is that when you enter the multiplier, it will cause a
calculation (so Value must be 0 when you do that). You'll likely go mad.
We'll come and see you.

Having iterations at 1 makes it easier to reset the darn thing too (set the
multiplier at 1, and just key in the negative of the current accumulation).

A macro might be a more manageable solution. You enter your values, push
the button, and get an answer. Another button could run a macro to reset
the accumulation to 0.
 
J

JoeS01

thanks for this response, Earl.

I am actually doing this for a secondary High School Maths classroo
simulation of outcomes of throwing a die, where I get the results of 1
throws, and then do another iteration, accumulating the results fo
each side of the die.

The aim is to illustrate the variation in results for a small number o
throws, compared to the equal probability of the outcomes as the numbe
of throws accumulate to a very large figure.

Hence the need to be able to set the number of iterations (n) to
large number, accumulate the results of each iteration, and to reset.

any suggestions as to why the accumulated results go wrong when th
Iterations are set to >1

My regards,
Jo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top