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

Shortcut: Clearing sim output data from the worksheet

ShareThis

You may discover that once you begin storing thousands - or millions - of individual iteration data records in your worksheet, your file size becomes unwieldy.  In some cases we have seen Excel file size exceed 15MB simply from storing a million data records.  This can cause sluggish execution, sluggishness in opening and closing files, and inconvenience in sharing the file through email, etc.

Therefore it's often useful to clean the simulation output data from the worksheet before saving the file.  Since this is a task we find ourselves performing repeatedly, we've developed the habit of creating a "Clear Data" command button next to the "Run Sim" command button in our models:

There's no big magic here - the button is linked to a simple one-line function...



...but it's a step-saver we frequently find useful.

 

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.