Vlookup Problem

P

pauluk

Hi All,

Can any one help. Am having a bit of trouble with my VLOOKUP code fo
some reason it is returning a value for were there should not be one.

The formula is =VLOOKUP(B9,ProjectCodesNew,2)

ProjectCodesNew refers to my list which have the names that it shoul
compare aginst then retrieve the Project code

but for some entries if a put in an name which issn't included on th
list then it returns a value... why is this???

Thanks
Pau
 
M

MACRE0

You are missing one part of the formula that tends to cause unusua
results - try adding ,0 at the end within the parentheses. Lik
=VLOOKUP(B9,ProjectCodesNew,2,0
 
J

JE McGimpsey

Take a look at VLOOKUP in XL Help. Pay particular attention to the
fourth argument (which when you leave it off, is by default True). Try

=VLOOKUP(B9,ProjectCodesNew,2,FALSE)

which will then return #N/A if the name isn't in the list.
 
H

Hari

Hi Paul,

Thnx for your formula. Didnt know that one could use named ranges in a
vlookup

Regards,
Hari
India
 
Top