BIGTONE559
Active Member
- Joined
- Apr 20, 2011
- Messages
- 336
RE: Multiple Arrays (Speeding things up a bit)
Greetings,
Nice to see the forum back up and running. . .
I have code that runs through multiple arrays trying to match data to items in the arrays and it takes a long time to run. I was looking for some insight on speeding things up a bit.
Code is similar to the following:
that's basically what the code does. however, it takes an extremely long time to get through with everything as each array increases in size.
PLEASE HELP
Greetings,
Nice to see the forum back up and running. . .
I have code that runs through multiple arrays trying to match data to items in the arrays and it takes a long time to run. I was looking for some insight on speeding things up a bit.
Code is similar to the following:
Code:
dim a as long
dim b as long
dim c as long
dim d as long
dim e as long
dim MyAarray as variant
dim MyBarray as variant
dim MyCarray as variant
dim MyDarray as variant
dim MyEarray as variant
for a=1 to ubound(myaarray)
for b=1 to ubound(mybarray)
for c=1 to ubound(mycarray)
for d=1 to ubound(mydarray)
for e =1 to ubound(myearray)
if cells(?,?).value=myarray(a,1) etc. . . . (for all arrays) then
'copies data to a workbook
end if
next e
next d
next c
next b
next a
that's basically what the code does. however, it takes an extremely long time to get through with everything as each array increases in size.
PLEASE HELP