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.
Printable View
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.
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...
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
Thanks to all your posts!