Results 1 to 3 of 3

Thread: Arrays (97)

  1. #1
    cfe5001
    Guest

    Arrays (97)

    I have a worksheet with string data in column "A", that I would like to load into an array. I know how to loop through the data and count the number rows (data elements), but am lost as to loading the elements into the array.

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Winnipeg, Canada
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Arrays (97)

    And then what?

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Arrays (97)

    You need to set up an array with

    Dim Names()

    then establish th enumber of elements in th ethe array and ReDim Names(No of Elements)

    You can then loop through your range and assign the values to the array elements something like :-

    For i = 1 to NoOfElements
    Names(i) = Range(FirstCell).Offset(i,0).value
    Next

Posting Permissions

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