VLOOKUP giving incorrect return

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
Hi
try
IF(ISERROR(VLOOKUP(C1,$A$1:$B$12,2,0)),"",VLOOKUP(C1,$A$1:$B$12,2,0))
 
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,""))
 
Frank

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top