Question:
Excel Question: How to I get rid of "N/A" when doing a VLookup?
Joy
2009-12-01 07:37:43 UTC
When I do a VLookup, if there is no data to return, Excel puts the following "N/A" in the empty space. How to I get rid of "N/A" when doing a VLookup? Right now, I'm deleting it row by row.
Three answers:
Randy
2009-12-01 08:41:44 UTC
Test for an error, if you get one return a blank, otherwise return your value:



=IF(ISERROR(VLOOKUP(C1,A$1:A$10,1, FALSE)),"",VLOOKUP(C1,A$1:B$10,2, FALSE))



In Excel 2007 there is a shortcut:



=IFERROR(VLOOKUP(C1,A$1:B$10,2,FALSE) ,"")



Hope that helps...
laraway
2016-12-14 16:12:15 UTC
Doing A Vlookup
siti Vi
2009-12-02 14:18:43 UTC
Assuming your formula is like this

=VLOOKUP(C1,$A$1:$A$10,2.0)



The #N/A result means: data like "data in C1" is not available in A1:A10

so you can chek it before the VLOOKUP work, using a logical test

COUNTIF($A$1:$A$10,C1) > 0



=IF( COUNTIF($A$1:$A$10,C1)>0, VLOOKUP(C1, $A$1:$A$10, 2, 0), "" )


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...