View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Loop is slow trying array code

Hi Howard,

Am Fri, 21 Feb 2014 02:27:54 -0800 (PST) schrieb L. Howard:

Still trying to figure the second 1 in the left portion.


if you loop through a range and put the values in an array like
for each rngC in myRng
myarr(i)=rngC.Value
i=i+1)
next
you get a 1D-Array. That array has 1 row and n columns

But if you read a range in an array you get a 2D-Array.
That array is build just like a table. If you read A2:B3 into an array
A2 is myArr(1, 1), B2 is myArr(1, 2), A3 is myArr(2, 1) and B3 is
myArr(2, 2)
The first number is row index, the second one the column index


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2