VLOOKUP giving incorrect return

C

cwilson

I thought this was an easy problem, but:

I have the following data,

A1 B1 C1 D1
12 1 64 =IF(ISERROR(VLOOKUP(C1,$A$1:$B$12,2)),"",VLOOKUP(C1,$A$1:$B$12,2))
14 1
14 1
21 1
22 2
43 2
20 2
32 2
25 3
33 3
37 3
67 3

The formula is giving me 3, but I want it to be blank. What did I do wrong?

Thanks in advance.
 
J

JulieD

Hi

vlookup actually has four parameters, the fourth is whether or not you want
it to do an approximate match. If you omit the fourth parameter or leave it
blank (which is what you've done) it will do an approximate match - which is
what it is doing. If you want an exact match you need to put the word FALSE
in as the fourth parameter e.g.:

=IF(ISERROR(VLOOKUP(C1,$A$1:$B$12,2,false)),"",VLOOKUP(C1,$A$1:$B$12,2,false
))

Cheers
JulieD
 
F

Frank Kabel

Hi
not sure about your second condition. How do you want to include it?.
Maybe something like:
IF(ISNA(MATCH(C1,$A$1:$A$12,0)),"",IF(E1=3,1,""))
 
C

cwilson

Frank

Thanks for the response. I posed the problem in another thread and you answered it there.
 
Top