View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Vlookup, return zero if not found

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



molsansk wrote:

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.


--

Dave Peterson