+ Reply to Thread
Results 1 to 4 of 4

range values in an array?

  1. #1
    Mike
    Guest

    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

  2. #2
    Niek Otten
    Guest

    Re: range values in an array?

    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




  3. #3
    Mike
    Guest

    Re: 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" <[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

    >
    >
    >


  4. #4
    Toppers
    Guest

    Re: 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" <[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

    > >
    > >
    > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1