View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default #DIV/0! How do I remove this answer?!?!?

Two IFs, only one comma. I think Harlan may have missed a bit when he was
copying the formula.
I haven't been through the formula in detail, but comparing it with the
earlier version I wonder whether it may be missing the part that says
*('Summary Days'!$O$3:$O$1500<0),
towards the end ?
--
David Biddulph

"Rebekah" wrote in message
...
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.