View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default Square brackets to specify a range

In message of Fri, 20 Aug 2010
15:52:07 in microsoft.public.excel.programming, GS
writes
It happens that Jim Cone formulated :
Yes.

Extract from a post by Tushar Mehta (six years ago)
'Start quote...
10,000 loops consisting of 4 statements, each setting the same variable
to a different range:
Time Rank
Set r = Range("$A$1", "$A$1") 0.090113 1
Set r = Range("A1", "A1") 0.1058 2


[snip]

'End Quote
-- Jim Cone
Portland, Oregon USA
http://tinyurl.com/ExtrasForXL


What is this? I followed the link, but did not download as I had no
notion what you were giving.


Hi Jim,
That's the first time I've ever seen a timed test result for this.
Thank you; much appreciated!


Hear hear. I also thank IanC for the question.
I had learned [A1] was "bad", but had no idea of relative speed.

Lacking a "lint" <http://en.wikipedia.org/wiki/Lint_%28software%29 for
VBA, can somebody point to a list of expensive technique alternatives?

Is the original post online?
I got 98 hits, none of which seemed relevant with <http://groups.google.
com/groups/search?as_q=A1+cells+range+&as_epq=&as_oq=&as_eq=& num=100&sco
ring=d&lr=&as_sitesearch=&as_qdr=&as_mind=1&as_min m=1&as_miny=2010&as_ma
xd=1&as_maxm=1&as_maxy=2010&as_ugroup=&as_usubject =&as_uauthors=Tushar+M
ehta&safe=off

Most of my code parses web output. I believe the Internet access time
dominates, but have not profiled the code. (Some 5+ second accesses.)
Amdahl's Law applies <http://en.wikipedia.org/wiki/Amdahls_law

I use the Document Output Model (DOM) to analyse output from connections
with CreateObject("InternetExplorer.Application"). I have not bothered
to find a method which avoids IE. I do use the registry to avoid
downloading pictures as that can lead to random widely-variable timings.

Has anybody got suggestions on practical Excel profiling? (I use 2003)
--
Walter Briscoe