ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Running Total of Random Number (https://www.excelbanter.com/excel-discussion-misc-queries/4140-running-total-random-number.html)

Mr H

Running Total of Random Number
 
Hi, I am trying to create a probablity simulation for a high school lesson.
It involves rolling 1/2 dice using the randbetween function to create the
die value.

I want to keep a running total of the outcomes 1-6 in a cell for each which
is linked to a chart.

Is this possible?



Peo Sjoblom

Do you mean a running total of all the values from the dice, if so do
toolsoptionscalculation and check iteration and change from 100 to 1,
assume randbetween formula is in A1 and you want the running total in B1,
in B1 put =A1+B1, press F9 to calculate


Regards,

Peo Sjoblom

"Mr H" wrote:

Hi, I am trying to create a probablity simulation for a high school lesson.
It involves rolling 1/2 dice using the randbetween function to create the
die value.

I want to keep a running total of the outcomes 1-6 in a cell for each which
is linked to a chart.

Is this possible?




Bernd Plumhoff

If I understand you correctly:

Enter =RANDBETWEEN(1,6) into cell A1 and copy down to
A100, for example.

Type 1,2,3,4,5,6 into cells B1,B2, ...,B6.

Enter =COUNTIF(A:A,B1) into cell C1 and copy down to cell
C6.

Select cells B1:C6, goto menu Insert/Chart and try some
charts you like.

HTH,
Bernd

Mr H

Thanks for your replies/help Peo Sjoblom & Bernd Plumhoff!

I tried both methods, the iteration method worked well but will this setting
affect any other worksheets I have? I don't have any other iterations or
circular references.

Bernd, I couldn't get yours to work. I did as you suggested but just got
the value 65535 appearing randomly in column C next to any of 1-6. However,
I would prefer a method that didn't use Tools Options, etc so that I can
share the worksheet with colleagues and students fairly novice at Excel.
Unless I have a macro that does it for me.

Thanks again!

Michael Aitchison



"Bernd Plumhoff" wrote in message
...
If I understand you correctly:

Enter =RANDBETWEEN(1,6) into cell A1 and copy down to
A100, for example.

Type 1,2,3,4,5,6 into cells B1,B2, ...,B6.

Enter =COUNTIF(A:A,B1) into cell C1 and copy down to cell
C6.

Select cells B1:C6, goto menu Insert/Chart and try some
charts you like.

HTH,
Bernd




Mr H

Thanks again, the finished worksheets (Coin Toss & Dice) are on
www.mathsroom.co.uk/downloads.htm if you are interested!





All times are GMT +1. The time now is 03:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com