Export very slow

H

Hank Youngerman

I have a program that does some moderately serious data manipulation.
Within the code, it reads 3000 lines from a worksheet, summarizes them
into 6 columns, sorts on one of the columns, then populates a text box
with formatted output. This all takes 2-3 seconds.

I then have a simple routine that basically says:

With worksheet("Sheet1")
for i=1 to 600
for j=1 to 6
.cells(i,j)=array(i,j)
next j
next i
end with
end sub

This routine alone takes almost 2 minutes.

Is there a faster way? Seems horribly slow to just fill about 3600
cells with already-calculated values.
 
T

Tom Ogilvy

With worksheet("Sheet1")
.cells(1,j).Resize(600,6)=array
end with
end sub

should be faster.
 

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