Results 1 to 4 of 4

Thread: Search an array

  1. #1
    Guest
    Can I anyone tell me the fastest way to
    search a 2-dimensional array.
    I have a 100 x 100 array and I only have to search
    the values on the first column.

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I don't have time to make code for you (sorry), but you can use two loops to do it, one for columns, one for rows...

  3. #3
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    OK, to search any multi dimensional array in only the first column, try this:
    Code:
    'This will find the first occurance
    For i = 0 To UBound(MultiDimArry, 1)
        If MultiDimArry(i, 0) = SearchString Then Exit For
    Next i
    
    'If i is not UBound(MultiDimArry, 1) then i = the dimension that has searchstring

  4. #4
    Guest
    Thanks to all your posts!

Posting Permissions

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



Click Here to Expand Forum to Full Width