View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rebekah Rebekah is offline
external usenet poster
 
Posts: 20
Default #DIV/0! How do I remove this answer?!?!?

Hi
Still having problems... Sorry to bother you again!
Max's result worked as long as the result was supposed to be zero, not if
the result was 1 or above... I have tried the following as you suggested, but
this again is throwing back an error message. I have tried entering the
formula with parenthesis around the last section (in case you omitted this in
error) but it still won't work?
=IF(COUNT(('Summary Days'!$D$3:$D$1500="2A")*('Summary
Days'$K$3:$K$1500=38)*ISNUMBER('Summary
Days'!$O$3:$O$1500)),AVERAGE(IF(('Summary Days'!$D$3:$D$1500="2A")*('Summary
Days'!$K$3:$K$1500=38)'Summary Days'!$O$3:$O$1500)),"")

Any more suggestions?!?!?!

Beks

"Harlan Grove" wrote:

Max wrote...
One way

Try, array-entered:
=IF(ISERROR(AVERAGE(IF(('Summary Days'!$D$3:$D$1500="2A")
*('Summary Days'!$K$3:$K$1500=38)
*('Summary Days'!$O$3:$O$1500<0),'Summary Days'!$O$3:$O$1500))),
"",AVERAGE(IF(('Summary Days'!$D$3:$D$1500="2A")
*('Summary Days'!$K$3:$K$1500=38)
*('Summary Days'!$O$3:$O$1500<0),'Summary Days'!$O$3:$O$1500)))

....

Too inclusive. The OP's formula would only have returned #DIV/0! if
there had been no cells matching the criteria. That's easily tested
using COUNT.

=IF(COUNT(('Summary Days'!$D$3:$D$1500="2A")
*('Summary Days'!$K$3:$K$1500=38)
*ISNUMBER('Summary Days'!$O$3:$O$1500)),
AVERAGE(IF(('Summary Days'!$D$3:$D$1500="2A")
*('Summary Days'!$K$3:$K$1500=38)
'Summary Days'!$O$3:$O$1500)),"")

This has the advantage of propagating error values in these ranges, if
any, as well as not masking errors arising from nonconforming ranges.