Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Array to Worksheets

Is there a quick way of outputting the contents of an array to a worksheet
without having to iterate through all the rows and columns?

I am think of the opposite of :

Array = Range("A1").CurrentRegion


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Array to Worksheets

I am think of the opposite of :

Array = Range("A1").CurrentRegion


exactly:
For a 2D array:

rw = Ubound(array,1) - lbound(array,1) + 1
col = Ubound(array,2) - lbound(array,2) + 1
range("A1").Resize(rw,col).Value = array

if it is a 1D array

col = Ubound(array,1) - lbound(array,1) + 1
Range("A1").Resize(1,col).Value = Array

or to put it horizontal

rw = Ubound(array,1) - lbound(array,1) + 1
Range("A1").Resize(rw,1).Value = Application.Transpose(Array)

In xl2000 and earlier, use of transpose restrict the number of array
elements to 5461.

--
Regards,
Tom Ogilvy



"Paul W Smith" wrote:

Is there a quick way of outputting the contents of an array to a worksheet
without having to iterate through all the rows and columns?

I am think of the opposite of :

Array = Range("A1").CurrentRegion



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Array to Worksheets

Nothing I want to mark this thread. Thanks guys.

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
Two worksheets, one array bob Excel Discussion (Misc queries) 2 June 14th 06 11:26 PM
Loop through array of worksheets Andibevan[_2_] Excel Programming 4 May 19th 05 11:49 AM
printing an array of worksheets Marco de Witte Excel Discussion (Misc queries) 4 December 8th 04 03:21 PM
For....Next- Array of worksheets. Julian Milano[_2_] Excel Programming 5 December 15th 03 01:09 PM
array worksheets GUS Excel Programming 1 September 23rd 03 03:13 AM


All times are GMT +1. The time now is 09:22 AM.

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"