PC Review


Reply
Thread Tools Rate Thread

03 vs 07: speed with different methods of referencing ranges?

 
 
ker_01
Guest
Posts: n/a
 
      15th Dec 2009
I did some minor testing on 2003 with bringing in arrays as reference vs
variant:

Dim rng As Range
Dim rng2 As Variant
RowCount = lastRow(Sheet2)

Set rng = Sheet2.Range("A1:Z" & RowCount)
rng2 = Sheet2.Range("A1:Z" & RowCount).Value

I then tested to see if processing on either was faster, using some simple
math calculations on my range content. For my sample data, they were within a
second of each other.

My workbook will likely be used by coworkers in another state who have 2007,
so I figured it would be wise to ask if anyone has noticed dramatic speed
differences in 2007 between processing data in one vs the other type of range
reference. I'll be working on some very large ranges later, so I want to make
sure I'm not shooting myself in the foot with whichever one I end up using.

Thanks,
Keith

 
Reply With Quote
 
 
 
 
Charles Williams
Guest
Posts: n/a
 
      15th Dec 2009
Excel 2007 was significantly slower than 2003, although Excel 2007 SP2 has
made things much better.
see http://www.decisionmodels.com/VersionCompare.htm for a detailed
comparison.

Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com

"ker_01" <(E-Mail Removed)> wrote in message
news:5314AF7B-36A1-47FD-923C-(E-Mail Removed)...
>I did some minor testing on 2003 with bringing in arrays as reference vs
> variant:
>
> Dim rng As Range
> Dim rng2 As Variant
> RowCount = lastRow(Sheet2)
>
> Set rng = Sheet2.Range("A1:Z" & RowCount)
> rng2 = Sheet2.Range("A1:Z" & RowCount).Value
>
> I then tested to see if processing on either was faster, using some simple
> math calculations on my range content. For my sample data, they were
> within a
> second of each other.
>
> My workbook will likely be used by coworkers in another state who have
> 2007,
> so I figured it would be wise to ask if anyone has noticed dramatic speed
> differences in 2007 between processing data in one vs the other type of
> range
> reference. I'll be working on some very large ranges later, so I want to
> make
> sure I'm not shooting myself in the foot with whichever one I end up
> using.
>
> Thanks,
> Keith
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to set attributes for server controls by referencing properties/methods/variables? Paul Microsoft ASP .NET 1 6th Dec 2006 09:14 AM
Referencing class methods when using JIT directives =?Utf-8?B?RXJpYyBMZW1tb24=?= Microsoft ASP .NET 1 19th Jan 2006 08:21 PM
Referencing unmanaged ActiveX control methods in C# Michiel Microsoft C# .NET 3 6th Sep 2005 01:37 PM
Referencing Ranges on other Sheets MatthewByrne Microsoft Excel Programming 3 28th Mar 2004 02:37 AM
referencing parent form methods John Microsoft Dot NET Framework Forms 3 4th Nov 2003 02:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:21 AM.