PDA

View Full Version : Formula: Tidy up Vlookup results



Thorcorp
2011-06-29, 06:30 PM
Hello,

I need a quick fix to tidy up a vlookup function. below is the regular function:

=vlookup(B3,scrap!$B$4:$F$4,5,False)

It works fine and such but is there an IF function I can put in so that if there is no value to return it returns 0 insteas of #N/A

Thank you in advance.

Bob Phillips
2011-06-29, 07:59 PM
Try

=IF(ISNA(VLOOKUP(B3,scrap!$B$4:$F$4,5,False)),0,VLOOKUP(B3,scrap!$B$4:$F$4,5,False))

or if you have Excel 2007/2010

=IFERROR(VLOOKUP(B3,scrap!$B$4:$F$4,5,False),0)

Thorcorp
2011-06-29, 08:56 PM
=IFERROR(VLOOKUP(B3,scrap!$B$4:$F$4,5,False),0)


Thank you! This one worked great!