Posts by adamfoster

    Hello,


    I am trying to create a subroutine that will allow me to recalculate a worksheet over and over again but using a variable time delay.


    I want the work sheet to recalculate quickly at first and then gradually slow down and then stop.


    Can you help?


    Below is the code I have been using, (which I copied and pasted from another thread), but It only accepts actual numbers for the "wait ()" subroutine.


    Please keep in mind that I am super new to trying to use VBA and I am just piecing this stuff together from what I can copy and paste from other sources (help forum's etc). I don't understand the code, but I have been experimenting with it to see if I can get it to do what I want. This is a slow process and now I've hit a roadblock!


    Anyway, thank you for the help!!!!
    Adam


    See code below




    here is the Wait Sub:


    Re: Recalculating a worksheet and saving the results


    but if I want to be able to change the number 100000 to as little as 4000 and see the results?


    That is instead of counting the number of 100000 random #'s Between 1and 1000 are less than 34 10,000 times I wanted to count the number of 4000 random #'s less than 34 10,000 times.


    Basically, This is for an educational simulation so I want to be able to change the number of cycles and have the data show up in real time to illustrate a point.


    Thanks for helping with this, I'm sorry if I am not providing clear questions!

    Re: Recalculating a worksheet and saving the results


    Thanks,


    Yeah, I can generate the random numbers no problem.
    On sheet 2 I am generating 100000 random numbers between 1 and 1000 then counting how many of them are below 34. what I want to do is save this value and then generate another 100000 on sheet 2 and redo the count and save about 10000 times so I can run some statistics on.


    How would I use the code you supplied? I am a very beginner, I know where to enter the code, but once it's in there, then I don't really know how to use it.


    Thank you!!!

    Hello,


    I am new to trying to programming with excel. I am trying to gather some statistics on random numbers generated by a worksheet. Here is what I would like to do:


    I would like to be able to use one sheet to call on another sheet to recalculate itself a specified number of times (up to 10,000) and after each recalculation to save one of the cells on the recalculating sheet.


    In other words, In the 1st worksheet I would get 10,000 cells of the results of the 2nd worksheet calculation that I could then run some simple statistics on.


    Is this possible? Is there a simple way to do this? I have very little experience!


    Thanks for the help!
    Adam