Display Scenario Name


Posted by Corey on September 21, 2001 12:34 PM

How can I display my Scenario name in a cell in my worksheet. Thanks.



Posted by Juan Pablo on September 22, 2001 7:25 AM

I think you have to use VB.

Go to Tools - Macro - Visual Basic Editor.
Once you're there, go to Insert - Module and in the white window copy this.

Sub PasteScenarioName()
Worksheets("Sheet1").Range("A1") = Worksheets("Sheet1").Scenario(1).Name
End Sub

When you execute this macro it will copy on cell A1 in Sheet1, the name of the FIRST scenario that exists in Sheet1. Change the sheet names (The ones in " ") and Range ("A1") as needed.

Juan Pablo