View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Refer to Elements in an array

Sub AAYY()
Dim varr As Variant
varr = Worksheets("Sheet1").Range("M5:P25").Value
Worksheets("Sheet2").Range("A1:D1").Value = Application.Index(varr, 1, 0)
End Sub

--
Regards,
Tom Ogilvy

"Derick" wrote in message
...
I have a dynamic array whcih would be redimed to hold
values in 20 rows and four columns TestArray(1 to 20, 4)

How can I refer to the array so that the contents of a row
in the array be sent to the worksheet.
For example Range("A1:D1") = TestArray(1,4)

Derick