PDA

View Full Version : Solved: Preventing N/A# in Vlookup?



DRJD
07-17-2008, 03:47 AM
Just a quick one hopefully, but I have been unable to find the answer on my own.

I want to change the default behaviour of a vlookup function, so that if the lookup value is not found, instead of populating the cell with "#N/A" it simply leaves it blank.

This should be easy and I have tried IF(vlookup(A1,C5:E10,2)="N/A","",vlookup(A1,C5:E10,2) but it doesn't work.

Can anyone tell me what is the correct way of referencing the "#N/A" so that I can replace it with a "".

DRJD
07-17-2008, 03:58 AM
Apologies.

Obiously I should be using ISERROR.

Simon Lloyd
07-17-2008, 04:17 AM
Yes or use ISNA:
=IF(ISNA(VLOOKUP(A1,C5:E10,2)),"",VLOOKUP(A1,C5:E10,2))