Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Value of #N/A in VLOOKUP 2

Status
Not open for further replies.

DanIT

MIS
May 11, 2001
67
CA
I am doing a VLOOKUP for an inventory application. I look at a column of material numbers, and return it's corresponding quantity from another column.

If there is a quantity listed, I want that number. If there's no entry for a material, I want to return a 0 (zero).

The VLOOKUP returns #N/A if there's no value. I am trying to use an IF statement to return a 0 if there's no corresponding entry, but cannot come up with a way to evaluate the #N/A with a true or false result.

Any help would be great. Thanks.
Dan
 
You need to use ISNA.

example:

=IF(ISNA(VLOOKUP(A1,B1:C20,2,FALSE)),0,VLOOKUP(A1,B1:C20,2,FALSE))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top