Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Speedy code required

Thanks egun,
Application.ScreenUpdating = False - was included
I wondered about taking everything 'off sheet' with arrays ...
Has anyone out there experienced significant advantage with their code by
doing this? Please let me know

"egun" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
speedy way to do array-frequency? Seeker Excel Discussion (Misc queries) 0 April 5th 09 04:03 AM
Speedy code required Joel Excel Programming 1 August 22nd 08 07:44 AM
Speedy way to create IF Function H0MELY Excel Worksheet Functions 3 February 10th 06 06:57 AM
Speedy line item entry with Macros Chris Leeson Excel Programming 4 February 27th 05 11:43 PM
speedy way to set values in a range emg178 Excel Programming 2 May 6th 04 08:04 PM


All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"