Developing Spreadsheet-Based Decision Support Systems - DSSBooks

13 downloads 17775 Views 226KB Size Report
... of Excel Objects. 10. 2.3 Entering Data into Cells ... 6.6 Exercises. 144. CHAPTER 7 Statistical Analysis with Excel .... A.3 Data Analysis Toolpack. 847. A.4 The ...
CH00_FM_4769

2/23/07

10:22 AM

Page i

Developing Spreadsheet-Based Decision Support Systems Using Excel and VBA for Excel

Michelle M.H. S¸eref Decision and Information Sciences Warrington College of Business University of Florida, Gainesville

Ravindra K. Ahuja Industrial and Systems Engineering University of Florida, Gainesville and Innovative Scheduling, Inc., Gainesville

Wayne L. Winston Operations and Decision Technologies Kelly School of Business Indiana University, Bloomington

Dynamic Ideas Belmont, Massachusetts

CH00_FM_4769

2/23/07

10:22 AM

Page v

Contents

PREFACE

PART I: CHAPTER 1 1.1 1.2 1.3 1.4 1.5 1.6

CHAPTER 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7

CHAPTER 3 3.1 3.2 3.3 3.4 3.5

CHAPTER 4 4.1 4.2

xiii

EXCEL ESSENTIALS Introduction

1

Introduction to Decision Support Systems Defining a Decision Support System Decision Support Systems Applications Textbook Overview Summary Exercises

2 3 5 6 8 8

Excel Basics and Formatting

9

Introduction Defining the Set of Excel Objects Entering Data into Cells Understanding Excel Menus and Toolbars Formatting Summary Exercises

10 10 10 13 20 27 28

Referencing and Names

31

Introduction Referencing Cells Names for Cells, Ranges, and Worksheets Summary Exercises

32 32 40 48 48

Functions and Formulas

53

Introduction Formulas and Function Categories

54 54 v

CH00_FM_4769

vi

2/23/07

10:22 AM

Page vi

Contents

4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11

CHAPTER 5 5.1 5.2 5.3 5.4 5.5 5.6

CHAPTER 6 6.1 6.2 6.3 6.4 6.5 6.6

CHAPTER 7 7.1 7.2 7.3 7.4 7.5 7.6

CHAPTER 8 8.1 8.2 8.3 8.4 8.5 8.6

CHAPTER 9 9.1 9.2 9.3

Logical and Information Functions Text and Lookup & Reference Functions Date & Time Functions Mathematical and Trigonometry Functions Statistical and Financial Functions Conditional Formatting Formulas Auditing Summary Exercises

58 66 77 84 88 95 97 99 99

Charts

105

Introduction Creating Charts with Chart Wizard Working with Chart Options Creating a Dynamic Chart Summary Exercises

106 106 111 116 119 120

Pivot Tables

123

Introduction Pivot Tables Further Modifications Pivot Charts Summary Exercises

124 124 130 142 144 144

Statistical Analysis with Excel

147

Introduction Understanding Data Relationships in Data Distributions Summary Exercises

148 148 161 174 181 182

Using the Excel Solver to Solve Mathematical Programs

187

Introduction Formulating Mathematical Programs The Excel Solver Applications of the Solver Summary Exercises

188 188 191 202 216 216

Simulation

221

Introduction Defining Simulation Applications

222 222 233

CH00_FM_4769

2/23/07

10:22 AM

Page vii

Contents

9.4 9.5

CHAPTER 10 10.1 10.2 10.3 10.4 10.5 10.6 10.7

PART II: CHAPTER 11 11.1 11.2 11.3 11.4 11.5

CHAPTER 12 12.1 12.2 12.3 12.4 12.5

CHAPTER 13 13.1 13.2 13.3 13.4 13.5 13.6 13.7

CHAPTER 14 14.1 14.2 14.3 14.4 14.5 14.6 14.7 14.8

vii

Summary Exercises

240 240

Working with Large Data

245

Introduction Importing Data Exporting Data Creating Pivot Tables from External Data Using Excel as a Database Summary Exercises

246 246 255 256 258 278 279

VBA FOR EXCEL Introduction to the Visual Basic Environment

283

Introduction The Visual Basic Editor The Object Browser Summary Exercises

284 284 287 289 290

Recording Macros

291

Introduction Macros Customizing Toolbars and Menu Options Summary Exercises

292 292 306 310 311

More on Objects

315

Introduction More on Properties and Methods The With Construct Referencing and Names in VBA Formulas in VBA Summary Exercises

316 316 344 347 355 361 361

Variables

367

Introduction Variable Declarations and Data Types Variable Scope Variables in User Interface VBA Math Functions Applications Summary Exercises

368 368 372 373 376 381 392 393

CH00_FM_4769

viii

2/23/07

10:22 AM

Page viii

Contents

CHAPTER 15

Sub Procedures and Function Procedures

399

15.1 15.2 15.3 15.4 15.5 15.6 15.7

Introduction Sub Procedures Function Procedures Public and Private Procedures Applications Summary Exercises

400 400 402 405 406 409 410

CHAPTER 16

Programming Structures

413

Introduction If, Then Statements Select Case Loops Exit Statements and End Applications Summary Exercises

414 414 419 420 423 427 434 434

Arrays

439

Introduction When and Why to Use Arrays Defining Arrays Dynamic Arrays Sorting Arrays Applications Summary Exercises

440 440 440 442 444 445 450 451

User Interface

455

Introduction User Form Controls User Form Options Event Procedures Variable Scope Error Checking Importing and Exporting Forms Navigating Professional Appearance Applications Summary Exercises

456 456 472 473 476 477 479 479 480 481 492 493

16.1 16.2 16.3 16.4 16.5 16.6 16.7 16.8

CHAPTER 17 17.1 17.2 17.3 17.4 17.5 17.6 17.7 17.8

CHAPTER 18 18.1 18.2 18.3 18.4 18.5 18.6 18.7 18.8 18.9 18.10 18.11 18.12

CH00_FM_4769

2/23/07

10:22 AM

Page ix

Contents

CHAPTER 19 19.1 19.2 19.3 19.4 19.5 19.6

CHAPTER 20 20.1 20.2 20.3 20.4 20.5 20.6

CHAPTER 21 21.1 21.2 21.3 21.4 21.5 21.6 21.7

PART III: CHAPTER 22 22.1 22.2 22.3 22.4 22.5 22.6 22.7 22.8 22.9

CHAPTER 23 23.1 23.2 23.3 23.4 23.5

ix

The Solver Revisited

499

Introduction Review of Chapter 8 Solver Commands in VBA Applications Summary Exercises

500 500 503 508 514 515

Simulation Revisited

519

Introduction Review of Chapter 9 Simulation with VBA Applications Summary Exercises

520 520 521 526 531 532

Working with Large Data Using VBA

537

Introduction Creating Pivot Tables with VBA Using External Data Exporting Data Applications Summary Exercises

538 538 544 557 558 565 566

CASE STUDIES The DSS Development Process

571

Defining the DSS Development Process Application Overview and Model Development Worksheets User Interface Procedures Re-solve Options Testing and Final Packaging Summary Exercises

572 572 574 580 587 589 593 594 594

GUI Design

595

GUI Design The Theory Behind Effective GUI Design Effective and Ineffective GUI Design Summary Exercises

596 596 602 607 607

CH00_FM_4769

x

2/23/07

10:22 AM

Page x

Contents

CHAPTER 24

Programming Principles

609

24.1 24.2 24.3 24.4 24.5

Programming Practices Clarity Efficiency Summary Excercises

610 610 611 613 613

CASE STUDY 1

Birthday Simulation

615

CASE STUDY 2

Eight Queens

629

CASE STUDY 3

Inventory Management

649

CASE STUDY 4

Warehouse Layout

669

CASE STUDY 5

Forecasting Methods

699

CASE STUDY 6

Facility Layout

721

CASE STUDY 7

Portfolio Management and Optimization

741

CASE STUDY 8

Reliability Analysis

765

CASE STUDY 9

Retirement Planning

791

Queuing SImulation: Single Server and Multi Server

815

Excel Add-Ins

843

Introduction Including Add-Ins and References using VBA Data Analysis Toolpack The Solver @RISK Crystal Ball StatTools Summary

844 844 847 847 853 854 854 854

Debugging and Error Checking

855

Introduction Types of Errors The Debug Toolbar The Debug Windows

856 856 857 859

CASE STUDY 10 APPENDIX A A.1 A.2 A.3 A.4 A.5 A.6 A.7 A.8

APPENDIX B B.1 B.2 B.3 B.4

CH00_FM_4769

2/23/07

10:22 AM

Page xi

Contents

B.5 B.6 B.7

APPENDIX C C.1 C.2 C.3 C.4

xi

Debugging Tips Error Checking Summary

861 862 866

Advanced Programming Topics

867

Introduction Object-Oriented Programming in VBA for Excel Opening Other Applications From VBA Summary

868 868 875 880

REFERENCES

881

ABOUT THE AUTHORS

883

INDEX

885