Automating Scenarios and Storing outcomes

MitchD7

New Member
Joined
Aug 25, 2019
Messages
2
I have a fairly simple model that has 10 steps and the time & cost of each step.

[TABLE="width: 619"]
<colgroup><col style="text-align: center;"><col style="text-align: center;"><col span="3" style="text-align: center;"><col style="text-align: center;"></colgroup><tbody>[TR]
[TD="align: center"]ID[/TD]
[TD="align: center"]Activity[/TD]
[TD="align: center"]ActivityTime[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Activity Cost[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Step 1[/TD]
[TD="align: center"]0[/TD]
[TD="align: center"][/TD]
[TD="align: center"]$0[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]Step 2[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"][/TD]
[TD="align: center"] $0.71[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]Step 3[/TD]
[TD="align: center"]180[/TD]
[TD="align: center"][/TD]
[TD="align: center"] $2.55[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]Step 4[/TD]
[TD="align: center"]180[/TD]
[TD="align: center"][/TD]
[TD="align: center"] $2.55[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]Step 5[/TD]
[TD="align: center"]30[/TD]
[TD="align: center"][/TD]
[TD="align: center"] $0.43[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]Step 6[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"][/TD]
[TD="align: center"] $0.07
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Total: $6.30

At the end I total the cost for the 10 steps. On another sheet I have a list of changes that would affect the times for one or more of the steps.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Change[/TD]
[TD]Time (sec)[/TD]
[TD]Total Cost[/TD]
[/TR]
[TR]
[TD]ID1[/TD]
[TD]10[/TD]
[TD]$5.50[/TD]
[/TR]
[TR]
[TD]ID2[/TD]
[TD]3[/TD]
[TD]$3.25[/TD]
[/TR]
</tbody>[/TABLE]



I don't have an issue building the scenarios by hand, and I use the Change value (eg. ID1) as the scenario name. And there will be times the change affects more than 3 steps in a model. What I am struggling with is automating the running of scenario without changing the model and logging the ResultCell from the Summary report to the Total Cost cell for ID1. Otherwise I have tab upon tab of Summary Reports and have to make Total Cost equal to the cell on the applicable summary report.

I am assuming VBA.

Any ideas?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top