View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Match function problem

Because you have told the function that it can expect a sorted range it
assumes that it can safely make assumptions about where the value will be.
(There are a few different algorythems it could be using but lets assume it
uses bisection). The first thing that the function will do is look at the
value in the mid point of the list and based on that value it will decide if
the value you are looking for is in the first half or the last half of the
list. By doing this it can very quickly zoom in on the desired value tossing
out half the list and choosing a new mid point with each iteration through
the loop. If you change the size of the array then you change the mid point
and since your mid point is essentailly random the function makes different
(wrong) assumptions with each iteration. That is why you will get seemingly
random results.
--
HTH...

Jim Thomlinson


" wrote:

Bob,

Thanks for the reply. I do know that it is not sorted and the 1 assumes
that it is sorted... the thing that bugs me is that there are no
additonal different values in there .... and excel does not seem to
give a consistent answer (I dont care if the answer is wrong).... what
bothers me is that the consistency is missing ..

-Naveen