Wednesday, January 12, 2011

Calculations that slow you down

When you are working in a workbook you may find yourself frustrated by how slow it is performing.  Often the computer is the first to receive the blame but here are some areas to consider before throwing your pc out the window.

First, if you have a lot of formulas, ask yourself do I need them to constantly refreshing?  If the answer is no then try switching your calculation options to manual.  When you are done with all your set-up you can switch back to automatic or even hit F9 whenever you are ready to see your results.  

If the values provided by your formulas are all you need, and the values used in the calculations are no longer changing, try to copy| paste special then selecting values.

Using VBA you can use set the cell equal to the value of a given formula or function as follows:
  • Cells(1, 2) = Application.VLookup(Cells(1, 1), Range(Columns(4), Columns(5)), 2, False)
Notice how I reference the cells with numbers rather than letters? The first is the row reference and the second a column reference (opposite from the A1 you may be accustomed to).  These numbers can now be substituted by variables which is very handy when nesting formulas within loops or if/then statements.  

To learn more about the full range of formulas and functions available in Excel 2007:

No comments: