replacing a #na

P

Pammy

I have a vlookup and when there is nothing for it to lookup as of yet, I get
a #Na, is there an =if iserror fomula I can add to the vlookup that will let
me add a "0" instead of the #na?
 
K

Kevin B

You can do something along these lines:

=IF(ISERROR(VLOOKUP(A1,$K1:$L21,2),0,VLOOKUP(A1,$K1:$L21,2))

If would prefer nothing replace the 0 with "", or "Your Message Goes Here".
 
P

Peo Sjoblom

Use ISNA

=IF(ISNA(your_formula),0,your_formula)

it's generally better to use ISNA in a case like this since one might want
to know if there are other errors involved and ISNA only finds #N/A errors
 
Top