VBA setting Range

J

Jeff

I have an array Array(1000) and I want to output the array into cells

B1:B1001

But when I use the logic

Application.Screenupdating=false
For i =1 to 1000
Range("B1").Offset(i,0).value=Array(i)
next i

It goes extremely slow. It takes about 3 minutes. Is there a fast way to
do this?

Thanks for your help
 
N

Norman Jones

Hi Jeff,

Try:

Range("B1").Resize(UBound(arr) - LBound(arr) + 1) = _
Application.Transpose(arr)
 
Top