Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Gracie Hughes   on Mar 04 In MS Office Category.

  
Question Answered By: Aaron Evans   on Mar 04

You have to remember that, in a sense, VBA is grafted onto Excel.
Every call to the worksheet  from VBA involves a time penalty, because
it has to negotiate with the worksheet and do some behind-the-scenes
work. So it's in your best interest to minimize the interaction as
much as possible. For example, instead of loop through 500 cells in a
range (generating 500 Range Objects), read the values into a array to
work with them, then write them back in one shot (potentially only
touching the worksheet twice).

I still don't understand why formulas  need to be shortened this way.
If your formulas are evaluating to values, how much screen real
estate could they possibly be taking up? One of the nicer features of
Excel 2007 is that it allows you to expand the formula bar to view
longer formulas.

Share: 

 

This Question has 26 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Worksheet functions in VBA Or get search suggestion and latest updates.


Tagged: