#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Paste Array

Hi,

I have an array

Array(750,200)

I want to paste the contents into the worksheet, i tried

Sheets("Sheet1").Range("C1:GU750").Value =
Application.WorksheetFunction.Transpose(Array)

but this didnt work, I guess because of transpose?

Is there a way to output a 2x2 array automatically?

Thanks for your help!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Paste Array

There is a limit of how many elements you can transpose in xl2k and below. If I
recall correctly, it's 5461 elements.

And your array is at least 750*200=150,000 elements.

But I'm not sure why you want to transpose the array anyway. If you're using
xl2003 or below, you only get 256 columns. So 700 columns won't fit.

This worked ok for me in xl2003:

Option Explicit
Sub testme02()

Dim myArr(1 To 750, 1 To 200) As Variant
Dim iCtr As Long
Dim jCtr As Long

For iCtr = LBound(myArr, 1) To UBound(myArr, 1)
For jCtr = LBound(myArr, 2) To UBound(myArr, 2)
myArr(iCtr, jCtr) = "x-" & iCtr & "-" & jCtr
Next jCtr
Next iCtr

Sheets("Sheet1").Range("C1") _
.Resize(UBound(myArr, 1) - LBound(myArr, 1) + 1, _
UBound(myArr, 2) - LBound(myArr, 2) + 1).Value _
= myArr

End Sub



Jeff wrote:

Hi,

I have an array

Array(750,200)

I want to paste the contents into the worksheet, i tried

Sheets("Sheet1").Range("C1:GU750").Value =
Application.WorksheetFunction.Transpose(Array)

but this didnt work, I guess because of transpose?

Is there a way to output a 2x2 array automatically?

Thanks for your help!!!


--

Dave Peterson
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
defintion of array function R..VENKATARAMAN Excel Discussion (Misc queries) 2 April 21st 06 03:21 AM
Paste Special and Linking ajkim001 Excel Discussion (Misc queries) 8 March 14th 06 02:10 PM
Paste Special Problem ajkim001 Excel Discussion (Misc queries) 1 March 10th 06 11:50 PM
Question to Bob Phillips (or whoever...) vezerid Excel Worksheet Functions 5 December 11th 05 11:44 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM


All times are GMT +1. The time now is 01:19 AM.

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

About Us

"It's about Microsoft Excel"