Average

J

jh3016

Here's my formula:
=AVERAGE(IF(MoTotals!$F$17:$F$28>0,MoTotals!$F$17:$F$28))

Now I want to add in this formula
And If cell <> A21

Just not sure how to put andif

Thanks in advance.
 
B

Bob Phillips

Do you just want to do the average if and only if a certain cell value is
equal to the value in A21? If so, then

=IF(B21=A21,AVERAGE(IF(MOTotals!$F$17:$F$28>0,MOTotals!$F$17:$F$28)),"")

as an array formula

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
J

jh3016

Sorry, what I want: if B21 not equal to "4/1/2005", then calculate the rest
of the formula.
 
B

Bob Phillips

=IF(B21<>--"2005-04-01",,AVERAGE(IF(MOTotals!$F$17:$F$28>0,MOTotals!$F$17:$F
$28)),"")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
S

Sloth

=AVERAGE(IF(AND(MoTotals!$F$17:$F$28>0,B21<>"4/1/2005"),MoTotals!$F$17:$F$28))

This should work as well.
 
J

jh3016

This only returns 0.00%, which is not right. Does this being a date make a
difference? Is there a DATE function that needs to be used?
 
D

Dave Peterson

maybe...

=AVERAGE(IF(AND(MoTotals!$F$17:$F$28>0,B21<>date(2005,4,1)),
MoTotals!$F$17:$F$28))

(still all one cell and still array entered)
 
Top