View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim Greenlaw
 
Posts: n/a
Default can lookup return err if no match found

Hi,
I think that was part of my problem. I should have been using vlookup. If
I could ask one more question. I understand the formula, lookup what I put
in this cell, find it in column a of this range and tell me what is in column
b on the same line. Give me #N/A if it's not there. But what does the "2"
refer to?

"Kleev" wrote:

Glad it worked for you. I realized after I posted my response that you had
actually asked about lookup rather than vlookup.

"Kim Greenlaw" wrote:

It works, it works, it works. Wish I had posted this question before I spent
so much time on it. Thank you very, very much.

"Kleev" wrote:

use the false argument:
=VLOOKUP(A14, Sheet4!$A$66:$B$70, 2, FALSE)
if no match, it will return #N/A

"Kim Greenlaw" wrote:

If lookup doesn't find a match in the first column, can I get it to return an
"ERR" or "0", something that would let me know there was no match? Right now
it returns the value in the second column of the closest value.