Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I would use something like this:
Option Explicit Sub testme() Dim myArr(1 To 5, 1 To 3) As Long Dim rCtr As Long Dim cCtr As Long Dim DestCell As Range 'test data only For rCtr = LBound(myArr, 1) To UBound(myArr, 1) For cCtr = LBound(myArr, 2) To UBound(myArr, 2) myArr(rCtr, cCtr) = rCtr * cCtr Next cCtr Next rCtr Set DestCell = Worksheets("Sheet1").Range("a1") DestCell.Resize(UBound(myArr, 1) - LBound(myArr, 1) + 1, _ UBound(myArr, 2) - LBound(myArr, 2) + 1).Value _ = myArr End Sub On 04/26/2011 07:18, Andy wrote: Hello, I have an array MyArray(10000,3), and I want to write this into sheet 1 starting at row 1 col 1. I would like to do it without using a for loop or a counter. I am looking for a way to paste the entire array at once. The reason for this is processing speed. A for loop takes a while when the array gets large. thanks, Andy -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I write an array to include all worksheets in a workbook? | Excel Worksheet Functions | |||
How to write (Selected range - 1) | Excel Discussion (Misc queries) | |||
How do I write formula to check a range of cells? | Excel Worksheet Functions | |||
Looping thru a range of cells | New Users to Excel | |||
looping across columns in range? | Excel Discussion (Misc queries) |