View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
egun egun is offline
external usenet poster
 
Posts: 88
Default Speedy code required

A lot of VBA code in Excel can be sped up tremendously if you don't
continuously use references to worksheets, cells, ranges, etc as you go.
Instead, pull all of your initial simulation data into memory and run your
simulations there using arrays to store results. When you're simulation is
completely done, blast your data back onto your worksheet in one big chunk.

Memory is cheap and plentiful these days, so use as much as you want!

Also, using Application.ScreenUpdating = False will eliminate the overhead
of having the screen redraw every time something changes on the active sheet.

Eric