power4XL Microsoft Excel Resource Center
Free Macros, Formulas, Functions, Tutorials, Downloads, Add-Ins & More!

Monte Carlo Excel minimal VBA approach "Bad Day" example output

ShareThis

Below is the output of the Bad Day "minimal VBA" approach example.

Cells G53 - G58 comprise the named range "BadDayTodayRange" referenced in the VBA code for this model.  The code reads the entire range, and outputs each value in the data output area (shown in the screenshot at the bottom of this page).

Rows 61 - 63 calculate the min, max, and average bad day from the data output area below.

Rows 68 - 89 build the histogram data using the "countif()" function applied to the data output range.

 

We've inserted the histogram in rows 94 - 116, and the data output area follows.  We've not included the entire data output area in the screen shot; it is as many rows long as the number of iterations specified by the user in the Inputs section.

 

Prev | Contents | Next

Copyright notice:  This site and all content, including computer code and spreadsheet examples, are copyright 2006 by Fritz Dooley.  License is granted for individual users to download examples and to copy code directly into user's spreadsheets and Visual Basic for Applications files.  Users may not redistribute code in any way.  Providing hyperlinks to this web site is encouraged, but posting code and examples on other web sites is expressly forbidden.  "Microsoft" is a registered trademark of Microsoft Corporation.   Neither this web site nor Fritz Dooley is affiliated with Microsoft Corporation.