View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Arne[_3_] Arne[_3_] is offline
external usenet poster
 
Posts: 3
Default Is member of an array?

it depends on whether your array elements are ordered or not. If they are, a lot of time can be gained using intelligent look-up algorithms, especially when your array has a lot of elements. Otherwise you'll just have to compare each array element with your reference string, where you can exit the loop when the array elements are unique or when you are interested in the first instance only.

So when your array is invariant, and you have to look up elements in it many times, sorting your array might be a good idea.