Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default COUNTIF by days of week

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the day of
week, so for year I would know the average daily revenue by Tuesdays or
Thursdays, etc.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default COUNTIF by days of week

Use SUMPRODUCT. More info he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Dave
--
Brevity is the soul of wit.


"Raza" wrote:

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the day of
week, so for year I would know the average daily revenue by Tuesdays or
Thursdays, etc.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default COUNTIF by days of week

Hi Raza,

=sunif(B2:b366,"Tue",C2:c366)/countif(b2:b366,"Tue")

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the day of
week, so for year I would know the average daily revenue by Tuesdays or
Thursdays, etc.

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default COUNTIF by days of week

The only problem is that 'Tue' is not actually Tue. The formula for B2 is
=A2, and the formatting is set up so that it shows Tue. When I pasted the
formula, it did not find any 'Tue' becuase really its a date. Any help?

"Marcelo" wrote:

Hi Raza,

=sunif(B2:b366,"Tue",C2:c366)/countif(b2:b366,"Tue")

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the day of
week, so for year I would know the average daily revenue by Tuesdays or
Thursdays, etc.

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default COUNTIF by days of week

ok,

use an auxiliar column (D for eg) with =weekday(a2) copy it down excel will
return 1 for Sun, 2 for Mon .... 7 for Sat

than use

=sumif(d2:d366,2,c2:c366)/countif(d2:d366,2)

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

The only problem is that 'Tue' is not actually Tue. The formula for B2 is
=A2, and the formatting is set up so that it shows Tue. When I pasted the
formula, it did not find any 'Tue' becuase really its a date. Any help?

"Marcelo" wrote:

Hi Raza,

=sunif(B2:b366,"Tue",C2:c366)/countif(b2:b366,"Tue")

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the day of
week, so for year I would know the average daily revenue by Tuesdays or
Thursdays, etc.

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default COUNTIF by days of week

just to clarify this formula will average Mon figures,

--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Marcelo" escreveu:

ok,

use an auxiliar column (D for eg) with =weekday(a2) copy it down excel will
return 1 for Sun, 2 for Mon .... 7 for Sat

than use

=sumif(d2:d366,2,c2:c366)/countif(d2:d366,2)

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

The only problem is that 'Tue' is not actually Tue. The formula for B2 is
=A2, and the formatting is set up so that it shows Tue. When I pasted the
formula, it did not find any 'Tue' becuase really its a date. Any help?

"Marcelo" wrote:

Hi Raza,

=sunif(B2:b366,"Tue",C2:c366)/countif(b2:b366,"Tue")

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the day of
week, so for year I would know the average daily revenue by Tuesdays or
Thursdays, etc.

Thanks!

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default COUNTIF by days of week

Try this *array* formula:

=AVERAGE(IF(TEXT(B1:B365,"ddd")="tue",C1:C365))

--
Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of
the regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually. Also, you must use CSE when
revising the formula.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Raza" wrote in message
...
The only problem is that 'Tue' is not actually Tue. The formula for B2 is
=A2, and the formatting is set up so that it shows Tue. When I pasted the
formula, it did not find any 'Tue' becuase really its a date. Any help?

"Marcelo" wrote:

Hi Raza,

=sunif(B2:b366,"Tue",C2:c366)/countif(b2:b366,"Tue")

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the
day of
week, so for year I would know the average daily revenue by Tuesdays
or
Thursdays, etc.

Thanks!


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default COUNTIF by days of week

A variation of RagDyer's formula:

=AVERAGE(IF(weekday(B1:B365)=2,C1:C365))

Still an array formula.

RagDyer wrote:

Try this *array* formula:

=AVERAGE(IF(TEXT(B1:B365,"ddd")="tue",C1:C365))

--
Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of
the regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually. Also, you must use CSE when
revising the formula.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Raza" wrote in message
...
The only problem is that 'Tue' is not actually Tue. The formula for B2 is
=A2, and the formatting is set up so that it shows Tue. When I pasted the
formula, it did not find any 'Tue' becuase really its a date. Any help?

"Marcelo" wrote:

Hi Raza,

=sunif(B2:b366,"Tue",C2:c366)/countif(b2:b366,"Tue")

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Raza" escreveu:

I have three columns of data as shown below, but for the entire year:

A B C
08/01/06 Tue 2999.78
08/02/06 Wed 3283.59
08/03/06 Thu 1516.91
08/04/06 Fri 2108.34
08/05/06 Sat 2035.85
08/06/06 Sun 3972.03
08/07/06 Mon 2949.30

I need a formula that can calculate the average daily revenue by the
day of
week, so for year I would know the average daily revenue by Tuesdays
or
Thursdays, etc.

Thanks!


--

Dave Peterson
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
Desperately trying to build a paid time off accrual worksheet... cgautreau Excel Worksheet Functions 9 June 24th 09 10:29 AM
update week to week in excel. Rudy Excel Worksheet Functions 3 September 4th 06 03:20 PM
Applying days of the week to dates will Excel Discussion (Misc queries) 1 December 5th 05 03:34 PM
Number of Week Days _including_ Holidays Andrew Perry Excel Worksheet Functions 1 June 9th 05 05:31 PM
selecting days of week using a formula in spreadsheets Terry Excel Worksheet Functions 6 April 23rd 05 01:19 PM


All times are GMT +1. The time now is 11:09 AM.

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

About Us

"It's about Microsoft Excel"