![]() |
range values in an array?
Is ther an easy way to read the values of multiple cells into an array?
myArray = Range(LeftCell, RightCell) <-? Thanks Mike |
range values in an array?
myArray = Range("A1:Z1")
Or do you mean something else? -- Kind regards, Niek Otten "Mike" wrote in message ... Is ther an easy way to read the values of multiple cells into an array? myArray = Range(LeftCell, RightCell) <-? Thanks Mike |
range values in an array?
I am wanting to put the values from each cell in a range into an array.
Thanks MIke "Niek Otten" wrote: myArray = Range("A1:Z1") Or do you mean something else? -- Kind regards, Niek Otten "Mike" wrote in message ... Is ther an easy way to read the values of multiple cells into an array? myArray = Range(LeftCell, RightCell) <-? Thanks Mike |
range values in an array?
Mike,
Further to Niek's reply (as an illustration): Sub test() Dim myArray As Variant myArray = Range("a1:b20") For r = 1 To UBound(myArray, 1) For c = 1 To UBound(myArray, 2) Debug.Print myArray(r, c) Next Next End Sub HTH "Mike" wrote: I am wanting to put the values from each cell in a range into an array. Thanks MIke "Niek Otten" wrote: myArray = Range("A1:Z1") Or do you mean something else? -- Kind regards, Niek Otten "Mike" wrote in message ... Is ther an easy way to read the values of multiple cells into an array? myArray = Range(LeftCell, RightCell) <-? Thanks Mike |
All times are GMT +1. The time now is 01:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com