Is ther an easy way to read the values of multiple cells into an array?
myArray = Range(LeftCell, RightCell) <-?
Thanks
Mike
Is ther an easy way to read the values of multiple cells into an array?
myArray = Range(LeftCell, RightCell) <-?
Thanks
Mike
myArray = Range("A1:Z1")
Or do you mean something else?
--
Kind regards,
Niek Otten
"Mike" <[email protected]> wrote in message
news:[email protected]...
> Is ther an easy way to read the values of multiple cells into an array?
>
> myArray = Range(LeftCell, RightCell) <-?
>
> Thanks
> Mike
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" <[email protected]> wrote in message
> news:[email protected]...
> > Is ther an easy way to read the values of multiple cells into an array?
> >
> > myArray = Range(LeftCell, RightCell) <-?
> >
> > Thanks
> > Mike
>
>
>
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" <[email protected]> wrote in message
> > news:[email protected]...
> > > Is ther an easy way to read the values of multiple cells into an array?
> > >
> > > myArray = Range(LeftCell, RightCell) <-?
> > >
> > > Thanks
> > > Mike
> >
> >
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks