VLOOKUP Formula: 0 instead of N/A

Kaka_67 -  
Mike-31 Posted messages 18405 Registration date   Status Contributeur Last intervention   -
Hello,

Could you help me find the formula that will give me "0" instead of N/A if Excel does not find the value searched for by the "vlookup" function?

Example

Lookup matrix:
A 10
C 20

Result:
A 10
B N/A --> I want it to give me 0
C 20

Thank you in advance.

2 réponses

Mike-31 Posted messages 18405 Registration date   Status Contributeur Last intervention   5 145
 
Hello,

Or if you have the 2007 or 2010 version
=IFERROR(your VLOOKUP formula;0)

which should give a formula like this to adapt of course

=IFERROR(VLOOKUP(X1,A1:F50,2,0),0)
--
Best,
Mike-31

A period of failure is a perfect time to sow the seeds of knowledge.
4
thedevildead
 
If(B="",0,do your search)

Explanation:

IF(logical_test; [value_if_true]; [value_if_false])
0