Solved

# Vlookup return 0 instead of N/A

Posted on 2012-09-15
Medium Priority
2,424 Views
When I copy my vlookup formula down I get either a number or N/A. Instead of the N/A I want a formula that would return a 0. My vlookup formula is below.

=VLOOKUP(A3,Sheet4!\$A\$4:\$B\$32,2,FALSE)

I found this formula below on a website...and I tried to modify it for my use but it did not work.

=IF(COUNTIF(\$B\$2:\$B\$100,A1), VLOOKUP(A1,\$B\$2:\$D\$100,3,0),””) (this is not my modified version)

Any help would be appreciated.

Thanks!
0
Question by:Edward Pamias

LVL 25

Accepted Solution

ID: 38401713
use the isna function, e.g.
=if(isna(VLOOKUP(A3,Sheet4!\$A\$4:\$B\$32,2,FALSE)),0,VLOOKUP(A3,Sheet4!\$A\$4:\$B\$32,2,FALSE))
0

LVL 70

Expert Comment

ID: 38401725
the formula below returns 0 if A3 is blank - is this what you want?

=IF(ISBLANK(A3),0,VLOOKUP(A3,Sheet4!\$A\$4:\$B\$32,2,FALSE))
0

LVL 26

Expert Comment

ID: 38401732
Hi, epamias.

=IFERROR(VLOOKUP(A3,Sheet4!\$A\$4:\$B\$32,2,FALSE),0)

This has...
... the advantage that the data is searched only once. (Trivial in this case, but often significant)
... the disadvantage that IFERROR didn't exist before Excel 2007.

Regards,
Brian.
0

LVL 19

Author Closing Comment

ID: 38401735
Thank you! This one worked. The last formula worked as well. Sorry I did not see that until after I accepted the ISNA formula.
0

LVL 26

Expert Comment

ID: 38401810
Not a problem, epamias. Glad you're sorted.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
###### Suggested Courses
Course of the Month14 days, 22 hours left to enroll