Hi,
There are two types of random number generators (RNG) in MS EXCEL :-
1) Rnd ---- Please ignore this, because it is a flawed/bad RNG (https://www.montecarloexceladdin.com/mersenne-twister-pseudorandom-number-generator-algorithm )
2) RAND() ----- May I know how to apply this RNG directly...
Please read this link : https://www.montecarloexceladdin.com/mersenne-twister-pseudorandom-number-generator-algorithm
Rnd() in VBA only have period of 2^24 while Mersenne Twister have period of 2^19937 !
So Rnd() in VBA is NOT a good RNG.
Hi,
I am looking for high quality Random Number Generator(RNG) similar to Mersenne Twister as a comprehensive MS OFFICE EXCEL add-in, enable users to generate random number in Excel VBA for Monte Carlo simulations.
One of the software that can meet this requirement is the Excel version of...
1) Yes. However, what important setting should I look into ?
2) While one next Excel-file macro is running, I try to open other excel file but failed( keep loading)
3) Yes, can open 2nd excel file alone and run macro of this 2nd file.
Can you try to run macro of your own excel file? While...
Before this, I am able to open up to max 8 different file and run the macro of each file(I never use DoEvents) ! Off course, I open it one by one . . .
However, after re-installation(due to computer problem) MS office 2016, I only can open 1 excel and run the macro, when try to open the second...
Hi,
While running macro in a excel file, I tried to open another different excel file to do some other work, but this excel just kept loading and never opened successfully. . . .How to solve?
I am using MS office Pro Plus 2016 on a machine with WINDOWS 7 64 bits.
Regards
James
Hi,
I know that I can get solve the problem(less than 30s) by simulation BEFORE I posted here !
What I want is to run through the complete cycle for the case of card game( Not the Pi case !) so that I can get the EXACT answer.
You may need 70 days all less to run through the complete cycle.
If you can separate a single workbook( iteration from 1 to r) to 5 workbooks for iterations from 1 to n, n+1 to m, m+1 to p, p+1 to q and q+1 to r, then run this 5 workbooks simulteneously, your total time may reduce to 70/5=14 days ?
why you need to hold all the outcome/results after each iteration in excel ? You can just sum it and only show the final results after 20 trillion iterations ! Am I missing something ?
once 5 cards was choosen for player and dealer, you have to compare the cards each other to see who is the winner. If you want to run a full complete cycle, total combinations=20 trillion !
I have added the trusted location(c:\temp\) but once open workspace, still only 1 file running. Please help !
Attached herewith 2 files for your testing.
OK, for casino game carribean stud poker, choose 5 cards for player, choose 1 card(face up) and then choose 4 cards from remaning deck for dealer, then compare the cards and see who is the winner. Total combinations= 20 trillion +-
All 5 files are with " Auto_Open" macros, once I open the workspace, only 1 file run automatically, all other 4 files just open but the macro not running ! How to solve ?
Problem :-
choose 5 cards randomly from a deck, choose 1 card from the remaning deck and choose 4 cards from the remaining deck. Total combinations = 52C5 * 47C1 * 46C4 = 20 trillion +- .
Hi,
.....and automatically run the macro in each file ?
I have five different excel files and stored in :-
c:\temp\file1.xls
.
.
.
c:\temp\file5.xls
Regards
James
Hi,
I have created a macro :-
For i = 1 To d Step 1
R = Rnd ^ 2 + Rnd ^ 2
If R <= 1 Then
count = count + 1
End If
Next
My problem here is "d " is a very large number(billions) and it takes very long time to run this macro.
It it possible to do...