Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Using Scenarios: Part 2

This worksheet will show you how to create scenario summaries to


compare different scenario outputs and reports and how to
automatically show different scenarios in Excel.

Create a Scenario Summary


You created and stored three different scenarios for the sales of FPY
Book Company. The bookstore manager has asked you to prepare a
report that summarises your findings.

Warning: This is a static report that does not change if the


Scenario data changes. Delete this report after printing it, and
create a new Summary when necessary.

To create a Scenario Summary:

1. On the Ribbon's Data tab, click What-If Analysis


2. Click the drop down arrow, and click Scenario Manager

3. Click the Summary button


4. In the Scenario Summary dialog box, for Report type, select
Scenario Summary.
5. Press the Tab key, to move to the Result cells box
6. On the worksheet, click on cell D12. This is the Profit cell, and
it changes, based on the sales amounts.

1
7. Click the OK button.
8. A Scenario Summary sheet is added to the workbook.

View the Scenario Summary


To compare the scenarios side by side, you can view the Scenario
Summary sheet that was created.

1. Select the Scenario Summary worksheet  (you may have to


double click on Sheet 1 to see it)
2. To show or hide the details, click the + / - buttons at the left
side and top of the worksheet 

In this example, the scenario cells on Sheet1, which contained your


original scenarios, have not been named, and this makes the
Scenario Summary sheet hard to read.

To make this easier to understand you may wish to name the cells
appropriately, i.e. RRP, First promotion etc. For example, to name
cell B2 RRP, you need to select the cell and enter RRP in the top left
hand corner of the worksheet. Please note: the names need to be
entered without spaces.

2
Enter the
names for
your variables
here

As mentioned, the summary report will not update automatically so if


you wish to see your newly named cells you have to run the
summary again. You can now edit the table, add spaces to the
names and borders or colours to the cells and format in any other
way you wish.

3
Create a Scenario PivotTable Report
For a different view of the Scenario data, you can create a pivot table
report:

Warning: This is a static report that does not change if the


Scenario data changes. Delete this report after printing it, and
create a new Summary when necessary.

1. On the Ribbon's Data tab, click What-If Analysis


2. Click the drop down arrow, and click Scenario Manager

3. Click the Summary button


4. In the Scenario Summary dialog box, for Report type,
select Scenario PivotTable report
5. Press the Tab key, to move to the Result cells box

4
6. On the worksheet, click on cell B6.This is the Profit cell, and it
changes, based on the sales and expense amounts.

7. Click the OK button.
8. A Scenario PivotTable sheet is added to the workbook 

View the Scenario PivotTable Report


1. Select the Scenario PivotTable worksheet  (you my have to
double click on Sheet1 to see it)
2. To rearrange the data, drag the field buttons to a different area
of the Pivot Table. This is a simple model, so not much can be
changed but you can drag the different promotions
$B$7:$B$11 from the row area to the column area.

You can now change the formatting in the completed pivot table, by
selecting a different PivotTable Style.

5
Creating a Dropdown List of Excel Scenarios
(Advanced)
To view a Scenario, you can choose What-If-Analysis | Scenario
Manager, then select a Scenario and click on Show to see different
scenarios. To make it easier to switch between Scenarios, you can
create a dropdown list of Scenarios, and use a macro with an event
code to show the selected Scenario. You first need to create a list of
drop down options for the scenarios in the same was as you did in
the Degree Calculator tool. Then you need to enter the macro code
to display the relevant scenario.

6
Note: The instructions below have been done using Excel for Mac
2010. I have attempted to add the relevant instructions for a PC but
you may have to do some research in order to identify the
appropriate steps for a PC where discrepancies occur.

Create a list of Scenarios

1. Starting in cell J3, type the heading, and Scenario names, as


shown below.  Please make sure that you put the list of
scenario names in the order in which they appear in scenario
manger.
2. Type in the text in H1 and make it bold. This is where you will
insert your drop down menu.

Insert the drop down combination button.

To do this, first you have to enable the Developer toolbar:

On a Mac:

1. Go to Excel and select Preferences.

7
2. In Excel Preferences select Ribbon, and then scroll down to the
bottom of the Ribbon preferences and click on Developer.

Click on
the
Ribbon

8
3. Click on OK.

On a PC:

1. Click on File then go down to Excel Options.


2. Choose the Customize Ribbon option and select the Developer
tab in the right hand side menu.

9
To insert the drop down combination button:

On a Mac:

1. Click on Developer in the Excel toolbar and Select the Combo


Box option.
2. Click on Cell I1 and the box will appear in your speadsheet.

10
On a PC:

1. Go to Developer, then in the Insert option choose Combo Box


(Form Control)
2. Click on Cell I1 and the box will appear in your speadsheet.
3. Resize the combo box so you can see the text behind it.

Format the drop down combination button.

You need to format the control button so that it knows where to get
the strings to put in the list, and where to put the number of the
selected item as well as give it the necessary code to show different
scenarios.

1. Right click on the button and choose Format Control (the very
bottom of the menu)

2. This opens the format drop box. Select cells J$4$:J$6$ as the
input range (i.e. these are the different scenarios one can
choose from) and cell K$3$ is the Cell link which specifies
which particular scenario is being displayed at any one time.
3. Change the Drop Down lines to 3 as we have three scenarios.

11
4. After clicking OK you can see the different options in the list
(you may have to left click on the button to see them.
5. Resize the button so the text of all options is clearly visible and
position it over cell I1.

Renaming the drop down combination button.

1. Right click on the combination drop down button to select it.


2. Change its Name from Drop Down 1 to DropDown in the top
left hand corner (the Naming Box) of the spreadsheet and
press Enter.

12
3. Save your work.

The renaming is necessary as it allows you to refer to the button


more succinctly in your code.

Enter the control code for the drop down combination button.

In order to allow the code to work you need to save your file in a
macro-enabled format. Click on File/Save as… and choose Excel
Macro Enabled format (.xlsm). Click on OK.

1. To enter the code click on Visual Basic in the Developer Tab


on a PC or Editor on a Mac.

On a PC: On a Mac:

13
2. You will see a list of all sheets in your workbook. Double click
on the one that contains the 3 scenarios (most likely this is
Sheet1) to see the editor.
3. Type in the following text in the editor (copying and pasting is
likely to introduce some random invisible characters that will
make your code fail). Please note the single quote before the
comment describing the code.

Sub ChangeScenario()

'Changes the scenario on the worksheet according to the choice made in the drop-down list

ActiveSheet.Scenarios(Range(ActiveSheet.Shapes(“DropDown”).ControlFormat.LinkedCell).Value).Show

End Sub

4. Go to File and select X Close and Return to Microsoft Excel.

Associate the control code for the Scenarios with the drop down
combination button.

The final step is to associate the command you just entered with
the drop down combination button.

1. Go back to your drop down combination box, right click on it


and select Assign Macro.

14
2. Double click on the macro you just created (most likely called
Sheet1.ChangeScenario but in the example above my macro is
called Sheet3.ChangeScenario ) and this will assign it to the
shape and close the box.
3. Test your drop down box. With a bit of application and quite a
lot of luck it will hopefully work!

Note: When opening the workbook, you will have to enable macros in
order to use this code.

15

You might also like