Thread: DAVERAGE
View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Andrew Andrew is offline
external usenet poster
 
Posts: 358
Default handling missing data

Here is the current formula for a cell:

=SUMPRODUCT(--(Main!$C$2:$C$266=$C2),Main!I$2:I$266)/SUMPRODUCT(--(Main!$C$2:$C$266=$C2),--(Main!I$2:I$266<""))

The problem is that when it finds DIV/0 or #VALUE errors anywhere in the
column it is searching, it then returns a #VALUE error. I would like to make
it more robust and able to still give a numeric return despite errors in some
of the cells it is searching. In the numerator of the above formula, maybe
instead of the criteria just "" also have 'not ERROR' or something like that.
any ideas how to specify that?
thanks