Hi Guys,
I'm looking for a hand in creating a macro to create a sensitivity array.
What I'm trying to do is change the variable's value (from .8 through to 1.2 as in the sheet), then copy the value of a dependent and paste it into an array to use for graphing. I've attached a simple example for reference. I tried hunting down some examples but most turn off updating, as I am changing a variable to get the value I want I don't think this is effective. I'm very much a novice at VBA so any help would be great. My best idea was a loop that continued until all the array cells had been filled in the row then moved onto the next. With respect to the example something like this.
Set Cell B15=0.8
Copy Cell B12
Paste to Cell D15
Set Cell B15+0.05
Copy Cell B12
Paste to Cell D16
.... repeat until B15=1.2
Set B15=1
Offset function +1 row
Repeat until all variables are complete
Like I said I'm a novice and have only taught myself limited VBA, so more than likely one of the local genius' has a far better way of doing it. The attached is a very simplified example of what I am trying to achieve. In reality the result calculated is a fair bit more complicated an involves many more variables, but it should give you an idea of what I am attempting to achieve.
Any assistance would be greatly appreciated, or if someone could point me in the direction of a better way I'd be very Sensivity Example.xlsx.
Bookmarks