#1   Report Post  
Posted to microsoft.public.excel.misc
Jeff
 
Posts: n/a
Default VBA setting Range

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default VBA setting Range

Hi Jeff,

Try:

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


---
Regards,
Norman



"Jeff" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM
Question regarding dynamic range setting dharmik Excel Worksheet Functions 2 July 22nd 05 08:44 PM
Cannot Expand Named Range - when size of the Range exceeds Snig Excel Discussion (Misc queries) 1 July 7th 05 01:46 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


All times are GMT +1. The time now is 08:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"