# Multiple iterations (Loops)

#### Wa_Wa

##### Board Regular
Hi,
So I have a model for a stock price, and it has many inputs. What I want to do is test all the different scenarios (ie a monte carlo simulation)

The inputs are in Cells A1:A5 - each one I have limits to stress to (ie A1 between 5 and 10 etc) - then I would like to copy and paste the results (results A10:15) - I would like 100 different iterations where we randomly select a input for each variable within the stated parameters

I have little VB experience so may be a daft question, but is this something VB can handle or need a more powerful tool?

### Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Try posting a sample of your data, and what you would like to do with it

how do I attached a excel spreadsheet?

Pls see below

What I am trying to do is populate cells B5; B6; B7 and B8 with a number between the max and min (column c and D), recalc and then copy B5:B:12 to F3:M3 (moving the last row down.)
Then repeat - is vba capable of this?

Excel Workbook
ABCDEFGHIJKLM
1
2StyleCallMaxMinStock PriceInterest RateVolaltilyDividendTheo ValueDeltaGammaTheta
3Strike1001000.80%50%0.16%100.50.860.21
4Expiry15/12/2011
5Stock Price1001500
6Interest Rate0.80%1.750
7Volaltily50%25%75%
8Dividend0.16%1%0%
9Theo Value10
10Delta0.5
11Gamma0.86
12Theta0.21
13
Sheet1

this is actually somthing I have been trying to do (no vba experience so finding it v.tough) - so would really love to know if anyone is able to work a solution out.

bumping back up as hoping someone out thee has some idea on where to start

Replies
0
Views
532
Replies
4
Views
90
Replies
1
Views
375
Replies
0
Views
743
Replies
4
Views
739

1,214,745
Messages
6,121,283
Members
449,021
Latest member
bob_messenger

### 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.

### Which adblocker are you using?

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

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