vlookup question


Posted by Walter on April 10, 2001 1:06 AM

Hi,
I use vlookup in column D and it returns the wrong Letters if it can't find the same number in column A (for example 3564,3565,3566). It would return TR but there shouldn't be anything there.

Why does it do that and how could I fix it?

Thank you very much for your help
Walter

..........A.......B.........C.......D
1.....3560.....EA.......3563.....TR
2.....3561.....CN.......3560.....EA
3.....3562.....PK.......3564.....PN
4.....3563.....TR.......3566.....PN
5.........................3564.....TR
6.........................3565.....TR
7.........................3566.....TR

Posted by Aladin Akyurek on April 10, 2001 1:12 AM

Try

=VLOOKUP(lookup-value,$A$1:$D$4,3,0)

The 4th arg, 0, forces an exact match. I think that's what you need. BTW, 0 means FALSE.

Aladin



Posted by Dave Hawley on April 10, 2001 1:46 AM

Hi Walter

Aladin has probably provided you the correct answer, however I would advise against forming the habit of replacing of replacing "False" with zero as it makes formulas very hard to read later on. You will look at different formulas and not know if the zero is relating to False or the number zero.


Dave
OzGrid Business Applications