View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default How to insert array into range

Another option to this excellent idea is to use Resize. This lets Excel do
the hard math...

Private Sub Test()
Dim str(1 To 7, 1 To 2) As String
Dim r As Integer
For r = 1 To 7
str(r, 1) = Format(r, "dddd")
str(r, 2) = Format(r * 29, "mmmm")
Next

Range("A14").Resize(UBound(str, 1), UBound(str, 2)) = str
End Sub

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


wrote in message
oups.com...
Hi Robert

I tried this and it worked nicely. Thanks :o)

/Lars