One way:
Array-enter (CTRL-SHIFT-ENTER, or CMD-RETURN):
=AVERAGE(IF(WEEKDAY($A$32:$A$396)=1,$C$32:$C$396))
alternatively:
=SUMPRODUCT(--(WEEKDAY($A$32:$A$396)=1),(C$32:C$396))/
SUMPRODUCT(--(WEEKDAY($A$32:$A$396)=1))
In article ,
Metolius Dad wrote:
Column A is the 365 dates of the year. Col C is the number of customers that
were in on that day. =SUMPRODUCT((WEEKDAY($A$32:$A$396)=1)*(C$32:C$396) )
tells me how many customers were in on ALL of the Sundays. What modification
do I make to tell me the AVERAGE number of customers in on a Sunday?
TIA
Sam Beardsley
|