Blanks in VLookUP

P

Phil Hageman

What code could be added to this formula, such that if P16
is blank, the cell holding this formula would also be
blank? What I get now is an error (#N/A) when P16 is
blank.

=VLOOKUP(P16,P28:R33,3)
 
J

John Wilson

Phil,

=IF(ISNA(yourlookup),0,yourlookup)

an example:
=IF(ISNA(VLOOKUP(P16,P28:R33,3)),0,VLOOKUP(P16,P28:R33,3))
or
=IF(ISNA(VLOOKUP(P16,P28:R33,3)),"",VLOOKUP(P16,P28:R33,3))

John
 
T

Trevor Shuttleworth

Perhaps the advantage of the solution posted by Tom and John is that it will
cater for other not found situations rather than just blank ... though the
OP did say specifically blanks.

Regards

Trevor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top