Help my slow looping process
Posted by David on October 10, 2000 12:54 AM
Can anyone help me speed this up. I am searching through a list of over 500 lines for matching serial numbers. My is statement is a lot longer than this one posted but that doesn;t matter. The point is when I find one on worksheet list I need to copy the first 11 columns to worksheet main. If there are 400 matches then it loops 400 * 11 times. I would like to skip the i = 1 to 11 loop somehow.
something like a copy paste but am haveing trouble.
Any of you excel gods want to give me a pointer or two?
For x = 3 To Worksheets("List").Range("A3").End(xlDown).Row + 1
If Worksheets("Main").Cells(2, 2)= (Worksheets("List").Cells(x, 1) Then
For I = 1 To 11
Worksheets("Main").Cells(rowcount, I) = Worksheets("List").Cells(x, I)
Next I
rowcount = rowcount + 1
end if
next x