View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default vlookup not giving correct output

Thanks for feeding back - glad it worked for you.

If you omit the 4th parameter then it defaults to TRUE, meaning that
the source data is expected to be sorted. (Behind the scenes, XL can
carry out a faster binary search for an item if the list is sorted,
but if it isn't then it has to carry a sequential search which can be
a lot slower. I've never understood, though, why there isn't an option
to say that you want an exact search AND the data is sorted, so that a
binary search can be carried out internally)

Pete

On Jul 3, 3:21*pm, houghi wrote:
Pete_UK wrote:

You need to amend your formula like so:


=VLOOKUP(A1;$A$1:$B$4;1;0)


The zero at the end (or it could be FALSE) tells XL to look for an
exact match. If it is missing, then the table being looked up need to
be sorted, and your's isn't.


Hope this helps.


Sorry for the late reply. It does. thanks. I thought that leaving it out
would automaticaly make it FALSE or 0.

houghi
--
Quote correct * (NL)http://www.briachons.org/art/quote/
Zitiere richtig (DE)http://www.afaik.de/usenet/faq/zitieren
Quote correctly (EN)http://www.netmeister.org/news/learn2quote.html