#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 331
Default Count Days

Good day,

I am working on a project to model some work flows. I have a date column
that is entered as 8/15/2009, and formatted to show "Friday, August 15,
2009". Now, I want to count the number of rows for Monday, Tuesday,
Wednesday, etc.

However, since the underlying data is all in the 8/15/2009 format, I can't
seem to either sort or run calcuations on the data for what I need.

Any help is greatly appreciated!

Thank you in advance,
Greg
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Count Days

Using the WEEKDAY function which gives Sunday = 1, Monday = 2, etc.

=SUMPRODUCT(--(WEEKDAY(A1:A10)=2))

This gives a count of how many cells in A1:A10 are Thursday. Note that
SUMPRODUCT can't callout entire column (A:A) unless using XL 2007. Feel free
to change the 2 to a cell reference, if desired.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Greg" wrote:

Good day,

I am working on a project to model some work flows. I have a date column
that is entered as 8/15/2009, and formatted to show "Friday, August 15,
2009". Now, I want to count the number of rows for Monday, Tuesday,
Wednesday, etc.

However, since the underlying data is all in the 8/15/2009 format, I can't
seem to either sort or run calcuations on the data for what I need.

Any help is greatly appreciated!

Thank you in advance,
Greg

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 331
Default Count Days

Asked and answered!

=TEXT(A1,"dddd")

Then copy info, Paste Special "Values" and run calculations.

Sorry for the post.

Greg

"Greg" wrote:

Good day,

I am working on a project to model some work flows. I have a date column
that is entered as 8/15/2009, and formatted to show "Friday, August 15,
2009". Now, I want to count the number of rows for Monday, Tuesday,
Wednesday, etc.

However, since the underlying data is all in the 8/15/2009 format, I can't
seem to either sort or run calcuations on the data for what I need.

Any help is greatly appreciated!

Thank you in advance,
Greg

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Count Days

See help on WEEKDAY Function.

Use a helper column to derive the day number from your dates.

=WEEKDAY(A1) copied down.

Count on that column.

=COUNTIF(A1:A100,1) returns a count of Sundays


Gord Dibben MS Excel MVP


On Mon, 17 Aug 2009 11:53:01 -0700, Greg
wrote:

Good day,

I am working on a project to model some work flows. I have a date column
that is entered as 8/15/2009, and formatted to show "Friday, August 15,
2009". Now, I want to count the number of rows for Monday, Tuesday,
Wednesday, etc.

However, since the underlying data is all in the 8/15/2009 format, I can't
seem to either sort or run calcuations on the data for what I need.

Any help is greatly appreciated!

Thank you in advance,
Greg


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Count Days

On Mon, 17 Aug 2009 11:53:01 -0700, Greg
wrote:

Good day,

I am working on a project to model some work flows. I have a date column
that is entered as 8/15/2009, and formatted to show "Friday, August 15,
2009". Now, I want to count the number of rows for Monday, Tuesday,
Wednesday, etc.

However, since the underlying data is all in the 8/15/2009 format, I can't
seem to either sort or run calcuations on the data for what I need.

Any help is greatly appreciated!

Thank you in advance,
Greg



=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(MIN(Rng)&":"&MAX(Rng))))=DOW ))

Rng is your column of dates (e.g. $A$4:$A$400)

DOW is the day of the week in which you are interested
1=Sunday
2=Monday
etc.

--ron


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Count Days

The following formula will return the number of Sundays in the list of
dates in A1:A30.

=SUMPRODUCT(--(WEEKDAY(A1:A30)=1))

Change the 1 to the appropriate day of week (1 = Sunday, 2 = Monday,
...., 7 = Saturday). The display format of the cells doesn't matter.

I have an entire page on my web site about working with days of the
week. See

http://www.cpearson.com/Excel/DayOfWeekFunctions.aspx

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Mon, 17 Aug 2009 11:53:01 -0700, Greg
wrote:

Good day,

I am working on a project to model some work flows. I have a date column
that is entered as 8/15/2009, and formatted to show "Friday, August 15,
2009". Now, I want to count the number of rows for Monday, Tuesday,
Wednesday, etc.

However, since the underlying data is all in the 8/15/2009 format, I can't
seem to either sort or run calcuations on the data for what I need.

Any help is greatly appreciated!

Thank you in advance,
Greg

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Count Days

On Mon, 17 Aug 2009 15:12:07 -0400, Ron Rosenfeld
wrote:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(MIN(Rng)&":"&MAX(Rng))))=DOW ))

Rng is your column of dates (e.g. $A$4:$A$400)

DOW is the day of the week in which you are interested
1=Sunday
2=Monday
etc.


I forgot to add that for MIN(Rng) and MAX(Rng) you can substitute dates (or
cell references containing dates), representing the Start and End date that you
might want to consider for analysis.

If you just want to analyze the entire column, then the entire
ROW(INDIRECT(...)) can be replaced merely by Rng.

e.g.: =SUMPRODUCT(--(WEEKDAY(Rng)=DOW))
--ron
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
Count Days more than 180 days prior to today Gregory Day Excel Worksheet Functions 4 March 28th 08 10:16 PM
When word says Install I want it count the days for 3 days w.o wee CYNTHIA Excel Worksheet Functions 1 March 23rd 08 05:28 AM
count days Dan Excel Discussion (Misc queries) 2 February 17th 08 11:16 PM
COUNT how many ROWS ago out of 10 days that the highest high in 10 days was made rhhince Excel Worksheet Functions 1 January 14th 07 09:56 PM
Count of days Albert Excel Worksheet Functions 5 March 2nd 05 08:33 PM


All times are GMT +1. The time now is 02:46 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"