ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   replacing a #na (https://www.excelbanter.com/excel-discussion-misc-queries/162031-replacing-na.html)

Pammy

replacing a #na
 
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?

Kevin B

replacing a #na
 
You can do something along these lines:

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

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

--
Kevin Backmann


"Pammy" wrote:

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?


Peo Sjoblom

replacing a #na
 
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


--

Regards,

Peo Sjoblom






"Pammy" wrote in message
...
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?





All times are GMT +1. The time now is 11:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com