Hello all,
I am by no means new to Excel, but i am very new to writing code for macros... I am working on a side project that I need to use ONLY the resources available to me at home. I use SAS frequently at work, and I know how to do this in SAS, but I can't use my work resources for personal use ...
I am running a bit of a simplified Monte Carlo simulation using random normal variables to calculate the price of a commodity based upon historical information and trends... What i am doing is simulating a certain number of prices, and calculating an average... This average is considered 1 "trial". I want to "paste special" this average into a cell as Trial 1, and then recalculate and "paste special" the next simulated average into a cell for trial two. I want this to loop for 1000+ trials...
Here is a little bit of code showing what i want the macro to do... just paste a value, move down one cell and paste the next simulated value. Can anyone add to this macro to make it loop until i get to a specified number of trials??
Thanks so much!!
*** since the RAND() function recalculates with every cell change or function, there's no need to re-calculate...
Bookmarks