ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   DATES and AVERAGES (https://www.excelbanter.com/excel-worksheet-functions/21923-dates-averages.html)

Metolius Dad

DATES and AVERAGES
 
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


JE McGimpsey

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



All times are GMT +1. The time now is 05:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com