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

K

ker_01

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top