I am having a nightmare of a time with this one. I am trying to load an array based on a variable number of ranges with variable sizes. For some reason, I am only getting values in the array for the last time through the loop. Any help would be greatly appreciated. Thanks in advance!!!
Here is a sample of the code:
dim ArraySkus
'brandcounter is a variable number
c3=0
do
copyrange = "a:" & firstrow & "a:" & lastrow
skucount = lastrow-firstrow+1
redim ArraySkus(skucount)
for each c2 in copyrange
ArraySkus(c3) = c2.value
c3=c3+1
next c2
c1=c1+1
loop until c1 = brand counter
Here is a sample of the code:
dim ArraySkus
'brandcounter is a variable number
c3=0
do
copyrange = "a:" & firstrow & "a:" & lastrow
skucount = lastrow-firstrow+1
redim ArraySkus(skucount)
for each c2 in copyrange
ArraySkus(c3) = c2.value
c3=c3+1
next c2
c1=c1+1
loop until c1 = brand counter