chandansify
09-11-2007, 08:08 PM
Hi All,
I just need a help on putting thousands of records from a string array to multiple cells in an excel sheet.
'Below is the example what I am doing currently to put multiple array values into cells
Sub ArraytoCells()
Dim cArray(10) As String
cArray(0) = "Value1"
cArray(1) = "Value2"
cArray(2) = "Value3"
cArray(3) = "Value4"
cArray(4) = "Value5"
cArray(5) = "Value6"
cArray(6) = "Value7"
cArray(7) = "Value8"
cArray(8) = "Value9"
cArray(9) = "Value10"
For i = 0 To 9
Cells(i + 1, 1) = cArray(i)
Next
End Sub
Can anyone suggest any better way in excel to do this task.
what i want is:
Range("A1:A10") = cArray 'i.e. putting all values in one go into excel cells.
Thanks in advance.
Regards,
Chandan
I just need a help on putting thousands of records from a string array to multiple cells in an excel sheet.
'Below is the example what I am doing currently to put multiple array values into cells
Sub ArraytoCells()
Dim cArray(10) As String
cArray(0) = "Value1"
cArray(1) = "Value2"
cArray(2) = "Value3"
cArray(3) = "Value4"
cArray(4) = "Value5"
cArray(5) = "Value6"
cArray(6) = "Value7"
cArray(7) = "Value8"
cArray(8) = "Value9"
cArray(9) = "Value10"
For i = 0 To 9
Cells(i + 1, 1) = cArray(i)
Next
End Sub
Can anyone suggest any better way in excel to do this task.
what i want is:
Range("A1:A10") = cArray 'i.e. putting all values in one go into excel cells.
Thanks in advance.
Regards,
Chandan