#1   Report Post  
Jason
 
Posts: n/a
Default Average If

I have sheet containing 365 days column B contains the day of the week column
c contains a number. I want to average the numbers for each day of the week.
i.e. average number for "Sun" This is a sheet modified daily and the cells
for the dates that have not occured yet are blank. Any suggestions. Thank you
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

=AVERAGE(IF(B2:B366="Sun",C2:C366))

entered with ctrl + shift & enter

--

Regards,

Peo Sjoblom


"Jason" wrote in message
...
I have sheet containing 365 days column B contains the day of the week

column
c contains a number. I want to average the numbers for each day of the

week.
i.e. average number for "Sun" This is a sheet modified daily and the cells
for the dates that have not occured yet are blank. Any suggestions. Thank

you


  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi Jason

here's two approaches depending on how the data is entered in column B
if it's entered as text - Mon, Tue, Wed etc
then use
=SUMIF(B2:B366,"Sun",C2:C366)/COUNTIF(B2:B366,"Sun")

if it's entered as a date and formatted to show the day of the week then you
can use
=SUMPRODUCT(--(WEEKDAY(B2:B366)=1)*C2:C366)/SUMPRODUCT(--(WEEKDAY(B2:B366)=1))

Cheers
JulieD

"Jason" wrote in message
...
I have sheet containing 365 days column B contains the day of the week
column
c contains a number. I want to average the numbers for each day of the
week.
i.e. average number for "Sun" This is a sheet modified daily and the cells
for the dates that have not occured yet are blank. Any suggestions. Thank
you



  #4   Report Post  
Jason
 
Posts: n/a
Default

Thank you Peo. How ever the result is dividing all the Sundays and giving my
a wrong answer. So far we have had 9 Sundays. The remaining cells are blank.
Is thier a way to get this to do the math based only on the cells that have
data in them? Thank you for the assistance

"Peo Sjoblom" wrote:

=AVERAGE(IF(B2:B366="Sun",C2:C366))

entered with ctrl + shift & enter

--

Regards,

Peo Sjoblom


"Jason" wrote in message
...
I have sheet containing 365 days column B contains the day of the week

column
c contains a number. I want to average the numbers for each day of the

week.
i.e. average number for "Sun" This is a sheet modified daily and the cells
for the dates that have not occured yet are blank. Any suggestions. Thank

you



  #5   Report Post  
Jason
 
Posts: n/a
Default

Nope that one isn't working either. It is still dividing by 52. I nelected to
say the columns A and B already have the Date and Day respectively for the
whole year.

"JulieD" wrote:

Hi Jason

here's two approaches depending on how the data is entered in column B
if it's entered as text - Mon, Tue, Wed etc
then use
=SUMIF(B2:B366,"Sun",C2:C366)/COUNTIF(B2:B366,"Sun")

if it's entered as a date and formatted to show the day of the week then you
can use
=SUMPRODUCT(--(WEEKDAY(B2:B366)=1)*C2:C366)/SUMPRODUCT(--(WEEKDAY(B2:B366)=1))

Cheers
JulieD

"Jason" wrote in message
...
I have sheet containing 365 days column B contains the day of the week
column
c contains a number. I want to average the numbers for each day of the
week.
i.e. average number for "Sun" This is a sheet modified daily and the cells
for the dates that have not occured yet are blank. Any suggestions. Thank
you






  #6   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

I assumed that there was as many Sundays as there are values in C, are you
saying that you have all Sundays for a year
while the values in C are not, if so use

=AVERAGE(IF((B2:B366="Sun")*(C2:C366<""),C2:C366) )

entered the same way


--

Regards,

Peo Sjoblom



"Jason" wrote in message
...
Thank you Peo. How ever the result is dividing all the Sundays and giving

my
a wrong answer. So far we have had 9 Sundays. The remaining cells are

blank.
Is thier a way to get this to do the math based only on the cells that

have
data in them? Thank you for the assistance

"Peo Sjoblom" wrote:

=AVERAGE(IF(B2:B366="Sun",C2:C366))

entered with ctrl + shift & enter

--

Regards,

Peo Sjoblom


"Jason" wrote in message
...
I have sheet containing 365 days column B contains the day of the week

column
c contains a number. I want to average the numbers for each day of the

week.
i.e. average number for "Sun" This is a sheet modified daily and the

cells
for the dates that have not occured yet are blank. Any suggestions.

Thank
you





  #7   Report Post  
JulieD
 
Posts: n/a
Default

Hi Jason

if you edit my second formula to
=SUMPRODUCT(--(WEEKDAY(B2:B366)=1)*C2:C366)/SUMPRODUCT(--(WEEKDAY(B2:B366)=1)*(C2:C366<""))

(if working with dates) or use (if text)
=SUMPRODUCT(--(B2:B366="Sun")*C2:C366)/SUMPRODUCT(--(B2:B366)="Sun")*(C2:C366<""))

Does this give you what you need
Cheers
julieD

"Jason" wrote in message
...
Nope that one isn't working either. It is still dividing by 52. I nelected
to
say the columns A and B already have the Date and Day respectively for the
whole year.

"JulieD" wrote:

Hi Jason

here's two approaches depending on how the data is entered in column B
if it's entered as text - Mon, Tue, Wed etc
then use
=SUMIF(B2:B366,"Sun",C2:C366)/COUNTIF(B2:B366,"Sun")

if it's entered as a date and formatted to show the day of the week then
you
can use
=SUMPRODUCT(--(WEEKDAY(B2:B366)=1)*C2:C366)/SUMPRODUCT(--(WEEKDAY(B2:B366)=1))

Cheers
JulieD

"Jason" wrote in message
...
I have sheet containing 365 days column B contains the day of the week
column
c contains a number. I want to average the numbers for each day of the
week.
i.e. average number for "Sun" This is a sheet modified daily and the
cells
for the dates that have not occured yet are blank. Any suggestions.
Thank
you






  #8   Report Post  
Jason
 
Posts: n/a
Default

Thats the one thank you very much. Jay

"Peo Sjoblom" wrote:

I assumed that there was as many Sundays as there are values in C, are you
saying that you have all Sundays for a year
while the values in C are not, if so use

=AVERAGE(IF((B2:B366="Sun")*(C2:C366<""),C2:C366) )

entered the same way


--

Regards,

Peo Sjoblom



"Jason" wrote in message
...
Thank you Peo. How ever the result is dividing all the Sundays and giving

my
a wrong answer. So far we have had 9 Sundays. The remaining cells are

blank.
Is thier a way to get this to do the math based only on the cells that

have
data in them? Thank you for the assistance

"Peo Sjoblom" wrote:

=AVERAGE(IF(B2:B366="Sun",C2:C366))

entered with ctrl + shift & enter

--

Regards,

Peo Sjoblom


"Jason" wrote in message
...
I have sheet containing 365 days column B contains the day of the week
column
c contains a number. I want to average the numbers for each day of the
week.
i.e. average number for "Sun" This is a sheet modified daily and the

cells
for the dates that have not occured yet are blank. Any suggestions.

Thank
you






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AVERAGE problems Jon Excel Worksheet Functions 5 February 1st 05 08:21 AM
average on 2 conditions Ted Metro Excel Worksheet Functions 6 January 7th 05 08:23 PM
Average Reggie Excel Worksheet Functions 2 December 29th 04 10:26 PM
calculate average hours worked llstephens Excel Worksheet Functions 1 November 24th 04 02:37 PM
average, array and offsets Darin1979 Excel Worksheet Functions 0 November 17th 04 04:21 PM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"