Google

Sunday, March 30, 2008

ISNA and Vlookup in Microsoft Excel

I believe you are frequent user of Vlookup function. Have you ever send #N/A in the result.

When you apply Vlookup on lookup value is it is available in Table array corresponding result will be displayed and if it is not available in Table array an error #N/A will be returned that looks very funny in the result.
To avoid this we use combination of IF, ISNA function with Vlookup, Syntax is as following.

=IF(ISNA(VLOOKUP(C6,$F:$F,1,0)),"",VLOOKUP(C6,$F:$F,1,0))

This formula will replace all #N/A to blank. You can put your custom text or 0 in place of "".

C6 is lookup value
F:F is table array

Try it yourself.

No comments: