Vlookup, return zero if not found

G

Guest

I have a formula where I use multiple lookups to return several values, which
I add together. e.g =vlookup(A) + vlookup(B) +vlookup (C)

If vlookup A = 1, B = 3, & C = 2, everything is good and the result = 7.

But in some cases the value one of them is looking up does not exist in the
array.
If this happens it causes the whole formula to return #N/A. I would like it
to give the one that has the #N/A to return the value of zero. So say
vlookup A = #N/A, my total formula would = 6

Any help appreciated. Thanks.
 
D

Dave Peterson

=if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
....
 
D

Dave Peterson

=if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
....
 
C

Carim

Hi,

Test your result with an IF , such as :

=IF(ISNA(vlookup(A)),0,vlookup(A))


HTH
Cheers

Carim
 
C

Carim

Hi,

Test your result with an IF , such as :

=IF(ISNA(vlookup(A)),0,vlookup(A))


HTH
Cheers

Carim
 

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