Write from variant array into range

G

Guest

can i write in one-step (i.e. no loops) from a dynamic array into a range,
how?

Dim myarr()
Redim myarr(1 to 10, 1 to 1)
myarr = Range("B1:B10")
'--Can I write myarr to Range("A1:A10") in one step?
 
N

Norman Jones

Hi Bharath,

'=============>>
Public Sub Tester()
Dim myarr As Variant

myarr = Range("B1:B10").Value
Range("A1:A10") = myarr
End Sub
'<<=============
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top