Built in Rnd Function repeats after workbook closes.

ChesterU

New Member
Joined
Apr 15, 2014
Messages
2
Hello,
This is my first post, so I apologize in advanced for any errors or novice interactions.

I have noticed that the Rnd Function repeats exactly the same pattern each time I close the workbook.
I am running a dice macro for a board game. It is turn base for 7 players, after each roll the player closes the workbook (it autosaves) and the next player opens the workbook to roll their dice.
The problem is that each time the workbook opens the int((6 - 1 + 1) * Rnd + 1) produces the exact same number as the previous turn. I thought it was an anomaly so I tested it. I ran the macro a few times and kept track of the numbers it produced, sure enough it seemed random. I closed the workbook and ran the dice again. To my surprise, I found that the macro provided the exact same numbers in the exact same order.

I am having a hard time finding a work around so that the numbers are 'truely' random each time.

Regards,
ChesterU
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,078
Latest member
skydd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top