I'm trying to grab information from another worksheet but when the line I'm
referencing on the other worksheet isn't available it returns the value #N/A,
which is fine but that's not what I was to display, I just want an empty cell
when it cannot find that info on the other worksheet. Here's an example of
what I'm trying to do....
=VLOOKUP(A2, names, 5, FALSE)
let's say A2 is Bob, if excel cannot find Bob in the "names" array it
returns the value #N/A. I cannot figure out how to make it return a value
that I would rather use. I've been playing with ERROR.TYPE but I can't seem
to get that to work for me because if VLOOKUP actually returns a value I get
another #N/A.
T. Valko - 05 Feb 2008 22:36 GMT
Try this:
=IF(ISNA(VLOOKUP(A2,names,5,0)),"",VLOOKUP(A2,names,5,0))

Signature
Biff
Microsoft Excel MVP
> I'm trying to grab information from another worksheet but when the line
> I'm
[quoted text clipped - 14 lines]
> get
> another #N/A.
Michelle - 05 Feb 2008 22:40 GMT
You can use the ISNA function nested in an IF statement...
If(ISNA(VLOOKUP(A2, names, 5, FALSE)),"",VLOOKUP(A2, names, 5, FALSE))
Hope this helps.

Signature
Cheers,
Michelle
"Anyone who says he can see through women is missing a lot." Groucho Marx
> I'm trying to grab information from another worksheet but when the line I'm
> referencing on the other worksheet isn't available it returns the value #N/A,
[quoted text clipped - 9 lines]
> to get that to work for me because if VLOOKUP actually returns a value I get
> another #N/A.