in reply to Re^2: getting elements from an array based on a value not in the arrayin thread getting elements from an array based on a value not in the array
but you are right. binary search is the best solution if we understood the OP right.