ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How Can I copy all value of the array into the range? (https://www.excelbanter.com/excel-programming/273894-how-can-i-copy-all-value-array-into-range.html)

sjoo

How Can I copy all value of the array into the range?
 
Hello Everyone,

I' m trying put an array data into a range as following,

Dim rng As Range
Dim s As Worksheet
Dim arr

Set s = Sheet1
Set rng = Range(s.Cells(1, 1), s.Cells(10, 1))

arr = Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J")

rng.Value = arr

but All cells of the range is filled with "A".

How Can I copy all value of the array into the range as following,
A1 - "A"
A2 - "B"
A3 - "C"
....
A10 - "J"

Thanks in advance.




All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com