Vlookup, return zero if not found

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
=if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
....
 
=if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
+if(iserror(vlookup(...)),0,vlookup(...))
....
 
Hi,

Test your result with an IF , such as :

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


HTH
Cheers

Carim
 
Hi,

Test your result with an IF , such as :

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


HTH
Cheers

Carim
 
Back
Top