View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default How to write an array to a range without looping

hi Andy,

Sub Test()
Dim a(1 To 3, 1 To 2)

For i = 1 To 3
a(i, 1) = i
a(i, 2) = i * 3
Next i

[A1:B3] = a
End Sub


--
isabelle

Le 2011-04-26 08:18, Andy a écrit :
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