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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need vlookup to show blank, or 0 instead of n/a 2

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
Below is the formula for a vlookup. It is working ok.
My question is: How can I get the column that shows
the points to be blank or zero instead of #n/a?

Code:
=VLOOKUP(C4,POINTS,2,FALSE)
 
Hi netrusher,

One way:
=IF(ISERROR(VLOOKUP(C4,POINTS,2,FALSE)),0,VLOOKUP(C4,POINTS,2,FALSE))

Cheers

[MS MVP - Word]
 
FYI: You can also use ISNA, which checks specifically for the #N/A error. ISERROR looks for any error. But either works fine in your case.

Bit I've read that COUNTIF is faster than VLOOKUP. So it would be better to do something like:
[tab][COLOR=blue white]=If(Countif(POINTS, C4),VLOOKUP(C4, POINTS, 2, 0), "")[/color]

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top