AVg question

T

Tammy

Would you somebody please tell me what the formula is:

If ByDay!a1:a65000 = "DFW" then do an average of the percentages found in
ByDay!d1:d65000
 
D

Dave F

=IF(COUNTIF(a1:a65000,"dfw")=65000,AVERAGE(d1:d65000),"")

But I'm not sure that's what you're looking to do. The above says calculate
the average in the range D1:D65000 only if all cells in the range A1:A65000
contain "DFW".

Dave
 
T

Tammy

thats exactly what I want. thanks.

Dave F said:
=IF(COUNTIF(a1:a65000,"dfw")=65000,AVERAGE(d1:d65000),"")

But I'm not sure that's what you're looking to do. The above says calculate
the average in the range D1:D65000 only if all cells in the range A1:A65000
contain "DFW".

Dave
 
D

Duke Carey

this is an array formula that you commit by pressing Ctrl-Shift-Enter all at
once

=average(if(ByDay!a1:a65000 = "DFW",ByDay!d1:d65000))
 
T

Tammy

thank you everyone! The first response, when I entered it, gave me a blank
result. But =AVERAGE(IF(ByDay!A1:A65000="DFW",ByDay!D1:D65000)) CSE worked!

thank you thank you
 
D

Dave F

Yeah I didn't think my response would help you. As I say, it would only
return the average if ALL cells in A1:A65000 contained "DFW"

Dave
 
Top