session 6 managerial spreadsheet modeling -- prof. juran1

38
Session 6 Managerial Spreadsheet Modeling -- Prof. Juran 1

Upload: alexandra-collins

Post on 24-Dec-2015

236 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Session 6

Managerial Spreadsheet Modeling -- Prof. Juran 1

Page 2: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 2

Outline

• Facilitating Change through Graphical Controls

• Restricting Change

Page 3: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 3

Easier “what if” experimentation– Less downtime when making changes– Mouse click vs. keyboard entry

Increased comprehension– Show effects of changes continuously

– Especially when tied into a graph– Remove the distracting intermediate steps of Excel data

entry

Why Bother Facilitating Change?

Page 4: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 4

“Vanilla” Excel – No VBA macros

But first: File | Options | Customize Ribbon | Developer

Graphical Controls

Page 5: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 5

Developer | Controls | Insert | Forms Controls

Graphical Controls

Page 6: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 6

Alternative: ActiveX Controls– More powerful, more options– Much less easy to use– Avoid, unless you know OOP– Toggle Design Mode

Graphical Controls

Page 7: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 7

After clicking on the button on the Forms Control, the cursor will change to a crosshair (+).

Move to where you want the control to be.

Click and hold the left mouse button, move to the opposite corner, and release the button.

Tip: To ensure that all the controls are the same size, right-click, copy and paste the first one.

The Magic: Right-click Format Control | Control | Cell link– Ties the graphical control to a value in a cell.

The rest of the spreadsheet can now key off of the value in that cell.

Selecting the Controls

Page 8: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 8

Spin Buttons are better for a few values.

Scroll Bars are better when there is a wide range of choices.

Spin Buttons and Scroll Bars

Min and max values that the cell can assume

Which spreadsheet cell contains the value? (Critical!)

Each time you click on an arrow

Each time you click on the scroll region (scroll bar only)

Sure; I’m not driving …

Page 9: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 9

Cell values can only be non-negative integers.

Example 1: Allow the inflation rate to vary between 2.0% and 4.5%, by 0.1%.

Example 2: Allow the confidence level to take on one of five values: 90%, 95%, 97.5%, 99%, or 99.5%.

Overcoming their Limitations

Page 10: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 10

Allows a choice from a pull-down menu– Similar to Data Validation with a list– List Box: Choices are always displayed

Combo Box and List Box

Column which contains the allowable choices

Contains the index number (1 – ?) of the current choice

To be displayed at any one time

Page 11: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 11

The font is too small.– Make everything small, then view at 200%?– Use ActiveX Controls instead.

Cannot use with protected cells.

Input range must be a column, not a row.– Unlike Data Validation.

Limitations

Page 12: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 12

Use in combination with the Choose function to select from among various scenarios.

– Soon we’ll learn about the powerful Index function.

Use in scenario planning

123456789

101112

A B C D E F G

Expected Profit $ 3.2 million Plant Size Decision 1

Demand Level 2

1 2Large Plant Small Plant Large Plant

1 High Demand 7.2 1.1 Small Plant2 Moderate Demand 3.2 3.13 Low Demand -4.8 4.1

Demand

Decision

=IF(G2=1,CHOOSE(G4,D10,D11,D12),CHOOSE(G4,E10,E11,E12))

Page 13: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 13

Another way to go: VLOOKUP or HLOOKUP

1

2

3

4

5

6

7

8

9

10

11

12

A B C D E F G

Expected Profit $ 1.1 million Plant Size Decision 2

Demand Level 1

Decision

1 2Large Plant Small Plant Large Plant

Demand 1 High Demand 7.2 1.1 Small Plant2 Moderate Demand 3.2 3.13 Low Demand -4.8 4.1

=HLOOKUP(G2,$D$8:$E$12,G4+2,0)

Page 14: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 14

Choose(index, value1, value2, …)

– If index = 1, return value1; if it is 2, return value2; and so on.

– If index < 1 or greater than the number of the last value in the list, Choose returns the #VALUE! error value.

– If index is a fraction, it is rounded down before being used.

The Choose() function

Page 15: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 15

For options with two choices.– Cell link is True if box is checked, False otherwise– Right-click and choose Edit Text to change the label

– Or delete the text and enter it into a cell instead, for more formatting options.

Check Boxes

Cell value will either be True or False.

Page 16: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 16

If(•), And(•), Or(•), and Not(•)

Work with conditions (e.g., “B3 = 12”) that are either True or False.

Cells can be True or False as well.

Check Boxes and Logical functions

1

2

3

4

5

A B CCheck Box Going to Cornell was the best decision I ever made.

FALSE

Debbie present?

1

2

3

4

5

A B CCheck Box Going to Cornell was the second best decision I ever made.

TRUE

Debbie present?

Page 17: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 17

Used when selecting one — and only one — of a set of choices.

– Construct just like a Check Box.– Cell link is the index of the Radio Button (1 – ?), just like a

Combo Box.– If you have more than one set of Radio Buttons, use the Group

Box to “corral” connected sets.

Example: Decision Analysis (as before)

Option (Radio) Buttons

12345678910111213

A B C D E F G H

Expected Profit $ 3.1 millionPlant Size 2 Small Plant

Demand Level 2 Moderate Demand

Decision1 2

Large Plant Small PlantDemand 1 High Demand 7.2 1.1

2 Moderate Demand 3.2 3.13 Low Demand -4.8 4.1

Plant Size

Demand Level

HighModerate

Low

Large

Small

=IF(G3="Large Plant",CHOOSE(F5,D11,D12,D13),CHOOSE(F5,E11,E12,E13))

Page 18: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 18

Restricting Change

Page 19: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 19

Spreadsheet users unknowingly introduce errors when they make changes to (formulas in) an existing spreadsheet.

Four methods to reduce inadvertently-introduced errors– Hide areas from the user– Protect areas from being changed– Warn about suspicious data before it’s entered– Document those changes that are made

Why Restrict Change?

Page 20: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 20

Rows, columns, and entire worksheets can be hidden (and unhidden).

– For aesthetic as well as security reasons.– Home | Format | Hide or Unhide | (Un) Hide

{Rows/Column/Sheet}– Rows and columns are set to zero height/width.

Make them invisible.– Set text color to background color.– Hide them under a chart or picture.– Home | Number | Custom | Type: ;;;– Downside: Makes them more susceptible to overwriting.

Hiding Regions

Page 21: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 21

All cells are Locked by default.

Unlock the cells you want the user to be able to change.

– Home | Cells | Format | Format Cells | Protection | Locked

– If there are only a few cells you want to protect:

Select all the cells on the worksheetType Ctrl-A, orClick on the box between A and 1 at the top left.

Unlock them all (as above). Then select and re-lock those

few cells you want to protect.Home | Editing | Find & Select | Formulas will select all of the equations.

Protecting Cells from Change: Step 1

Page 22: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 22

At this point you need to enable protection for the cells you locked in Step 1.

Home | Cells | Format | Protect Sheet– Don’t bother with passwords (unless

your spreadsheet is proprietary).– Undo with Home | Cells | Format |

Unprotect Sheet

You’re trying to prevent inadvertent changes.

Protecting Cells from Change: Step 2

Page 23: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 23

In order to hide your formulas from viewing or editing:– Select those cells whose formulas you want to hide,– Home | Cells | Format | Format Cells | Protection |

Hidden, and– Home | Cells | Format | Protect Sheet

Cells still can be overwritten.– Unless, of course, they’re Locked as well.

Side Note: Hiding Formulas

Page 24: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 24

File | Save As | Excel Workbook | Tools | General Options

Adding Passwords to Workbooks

– Password to open: Required to even open the file.

– Password to modify: Required to be able to modify the file; otherwise it opens as a read-only file.

– Don’t rely on passwords for absolute protection.

Page 25: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 25

Avoid common passwords, which include:– 16%: First name (zack)– 14%: Keyboard pattern (qwerty, 1qaz2wsx)– 5%: Pop-culture reference (pokemon, klingon, legolas), or– looks like a password (blink182, rush2112, 8675309)– 4%: Variation on “password” (passw0rd, drowssap)– 4%: Nearby objects (samsung, dell)– 3%: “Emo” words (obscenities, ihateyou)– 3%: Indifference words (whatever, nothing)– 1%: Movie passwords (letmein, trustno1, joshua, ramsesii)– 1%: Sports related (jordan23)

Secure: First letters of some phrase: mni0k0k

Secure: Four random words: correct horse battery staple

Passwords

Page 26: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 26

Low-tech: put an If(•) function in a nearby cell:– Example: A1 contains self-reported GPA.– Format A2 to be bold red, and define– A2 = If(A1<4.333, "", "Reported GPA is too

high!")

High-tech Version: Data | Data Tools | Data Validation– Permits only selected values to be entered into a cell.– Only works with unprotected worksheets.– Not absolutely foolproof: You can always paste any value

into a cell that is protected by data validation.

Warning of Bad Data

Page 27: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 27

Settings tab:

Data Validation

Page 28: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 28

Note that the list can be separated by commas — the values don’t need to be placed on the spreadsheet.

Data Validation: Choose from a List

1

2

3

A B C

Confidence level 99.0%

Could instead refer to a range of values elsewhere in the worksheet.

Page 29: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 29

Can use Data Validation instead of Combo Boxes.

Good application of VLOOKUP(•) and IF(•).

Scenario Planning (revisited)

123456789101112

A B C D E F G

Expected Profit $ 3.1 million Plant Size Decision Small Plant

Demand Level Moderate Demand

1 2Large Plant Small Plant Large Plant

1 High Demand 7.2 1.1 Small Plant2 Moderate Demand 3.2 3.13 Low Demand -4.8 4.1

Decision

Demand

=IF(E2="Large Plant",VLOOKUP(E4,$C$10:$E$12,2,0),VLOOKUP(E4,$C$10:$E$12,3,0))

Page 30: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 30

Data Validation: Getting Fancy

Page 31: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 31

If you can’t restrict changes, can you at least keep track of them?

Helpful for group projects, too.

Review | Changes | Track Changes | Highlight Changes– Track changes while editing.

Documenting Changes

Page 32: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 32

The goal of restricting change is to reduce the inadvertent introduction of errors. Techniques include:

– Hide cell values and/or formulas.– Protect the cells against being changed.– Protect the workbook from being opened without

authorization.– Validate that only reasonable data can be entered.– Track the changes that are made.

Take-aways

Page 33: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 33

Hands-on practiceMake a table of your core courses, and the grade you deserved in each.

Then use a Combo Box and the Choose function to list the grade for any selected course in an adjacent cell.

Page 34: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 34

Use a spin button to allow a cell to be:– An integer between 3 and 12.– An integer between -10 and +15.– The third Friday for any of the next six months (tricky).

Use a scroll bar to allow a cell to take on the values -10.0%, -9.9%, ..., 24.9%, 25.0%.

Hands-on practice

Page 35: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 35

Use Check Boxes and/or Radio Buttons to identify purchased marshmallows as either large or small. Add a tax of 8.5% to large marshmallows (which are considered candy) but not small marshmallows (which aren’t).

Use Radio Buttons to allow the user to pick one of the first four numbers. If they pick 3, print the message “75% of all people pick 3.”

Or whatever.

Hands-on practice

Page 36: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 36

Practice the different ways of hiding information– Hiding rows, columns, and worksheets– Changing the text color to the background color– Changing the number format to ;;;– Change the cell protection to Hidden

Create a protected worksheet where the user can change all but three cells.

Create a protected worksheet where the user can change only two given cells.

Hands-on Practice

Page 37: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 37

Use data validation to:– Allow only integers between 21 and 37.– Allow only even numbers.– Allow only the values: Base Case, Optimistic, and

Pessimistic.– Mess around with the Error Alert and the Input Message.

Track changes to see how the documentation works.

Hands-on Practice

Page 38: Session 6 Managerial Spreadsheet Modeling -- Prof. Juran1

Managerial Spreadsheet Modeling -- Prof. Juran 38

• Deliverable: Pro Home Builders• Keyboard Shortcut quiz

For Next Time