Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 27th 06, 03:28 PM posted to microsoft.public.excel.worksheet.functions
neowok
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week


Basically I have 2 columns each with a list of dates in no particular
order (and containing blank cells too), one planned date column and one
actual date column.

What I need to do is plot this on a graph, and since the number of
dates has no set limit and I dont want to have to plot maybe 100 dates
on the x axis, so i want to group them by week before plotting them,
i.e. 10 dates for week ending 10th jan, 25 dates for week ending 17th
jan etc

I have a pivot table that counts how many of each date occurs, i.e. 10
x 2nd jan, 7x 3rd jan etc etc but it does not split them into weeks.

im sure theres an easyish way of doing it so i can get the 2 lines on
the graph for no. of planned dates each week and no. of actual dates
each week, i just cant see it.

thanks


--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716


  #2   Report Post  
Old January 27th 06, 04:07 PM posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week

=SUMPRODUCT(--(A2:A200=--"2006-01-04"),--(A2:A200<=--"2006-01-10"))

gives a count for the week in those dates

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"neowok" wrote in
message ...

Basically I have 2 columns each with a list of dates in no particular
order (and containing blank cells too), one planned date column and one
actual date column.

What I need to do is plot this on a graph, and since the number of
dates has no set limit and I dont want to have to plot maybe 100 dates
on the x axis, so i want to group them by week before plotting them,
i.e. 10 dates for week ending 10th jan, 25 dates for week ending 17th
jan etc

I have a pivot table that counts how many of each date occurs, i.e. 10
x 2nd jan, 7x 3rd jan etc etc but it does not split them into weeks.

im sure theres an easyish way of doing it so i can get the 2 lines on
the graph for no. of planned dates each week and no. of actual dates
each week, i just cant see it.

thanks


--
neowok
------------------------------------------------------------------------
neowok's Profile:

http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716



  #3   Report Post  
Old January 27th 06, 04:26 PM posted to microsoft.public.excel.worksheet.functions
neowok
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week


hmmm that would work if i have a smallish, set number of weeks and i
know what the weeks are, but this is a dynamic document where the date
range is subject to change daily


--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716

  #4   Report Post  
Old January 27th 06, 05:06 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week

Is the date a row field?

How about rightclicking on it and choosing choose Group and show detail.

Then group by weeks.

If excel's weeks are different than yours, you could use add a new column in the
raw data and determine the week based on whatever rules you follow. Then use
that in the pivottable.



neowok wrote:

Basically I have 2 columns each with a list of dates in no particular
order (and containing blank cells too), one planned date column and one
actual date column.

What I need to do is plot this on a graph, and since the number of
dates has no set limit and I dont want to have to plot maybe 100 dates
on the x axis, so i want to group them by week before plotting them,
i.e. 10 dates for week ending 10th jan, 25 dates for week ending 17th
jan etc

I have a pivot table that counts how many of each date occurs, i.e. 10
x 2nd jan, 7x 3rd jan etc etc but it does not split them into weeks.

im sure theres an easyish way of doing it so i can get the 2 lines on
the graph for no. of planned dates each week and no. of actual dates
each week, i just cant see it.

thanks

--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716


--

Dave Peterson
  #5   Report Post  
Old January 27th 06, 05:27 PM posted to microsoft.public.excel.worksheet.functions
neowok
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week


the dates are in 2 columns, i went to group but cant see how i could
group them by week (no options for this)

top few cells of one of the planned date column and 2 extra needed for
the graph may look something like this if it all works

Planned week ending numberof items
01-01-06 01-01-06 3
<blank cell 08-01-06 2
<blank cell 15-01-06 1
05-01-06 26-02-06 1
01-01-06
01-01-06
25-02-06
<blank cell
<blank cell
15-01-06
03-01-06
<blank cell
etc etc

the graph could then be based on the week ending and number of items
column for the planned series, and then the same thing again for the
actual series.

I think i need to get an automated split of weeks in one column (B)
(ending on say sundays) and then in column C, the number of dates in
column A which falls during the week in column B

if not that then some other way of getting the same sort of result just
so I can draw the graph.


--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716



  #6   Report Post  
Old January 27th 06, 05:32 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week

If your field has text or blanks, then you can't use that grouping.

Excel has a =weeknum() function that might be ok right out of the box.

=if(a2="","",weeknum(a2))
???


neowok wrote:

the dates are in 2 columns, i went to group but cant see how i could
group them by week (no options for this)

top few cells of one of the planned date column and 2 extra needed for
the graph may look something like this if it all works

Planned week ending numberof items
01-01-06 01-01-06 3
<blank cell 08-01-06 2
<blank cell 15-01-06 1
05-01-06 26-02-06 1
01-01-06
01-01-06
25-02-06
<blank cell
<blank cell
15-01-06
03-01-06
<blank cell
etc etc

the graph could then be based on the week ending and number of items
column for the planned series, and then the same thing again for the
actual series.

I think i need to get an automated split of weeks in one column (B)
(ending on say sundays) and then in column C, the number of dates in
column A which falls during the week in column B

if not that then some other way of getting the same sort of result just
so I can draw the graph.

--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716


--

Dave Peterson
  #7   Report Post  
Old January 27th 06, 06:42 PM posted to microsoft.public.excel.worksheet.functions
neowok
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week


hm might be able to use severla more columns and use weeknum. i can use
a macro to copy the weeknum formula down for however many rows the
dates go, then maybe make a pivot table of that column giving me a
count of each weeknum, then somehow convert the weeknums into weeks
that i can use as x axis labels and base the chart off the pivottable
but without using a pivotchart. or something, but thats probly a bit
too complicated to work hehe ill have to fiddle with it on monday


--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716

  #8   Report Post  
Old January 27th 06, 10:48 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week

Or instead of using the week number, use the date of the first day in the week
(or the Friday of that week or...)

neowok wrote:

hm might be able to use severla more columns and use weeknum. i can use
a macro to copy the weeknum formula down for however many rows the
dates go, then maybe make a pivot table of that column giving me a
count of each weeknum, then somehow convert the weeknums into weeks
that i can use as x axis labels and base the chart off the pivottable
but without using a pivotchart. or something, but thats probly a bit
too complicated to work hehe ill have to fiddle with it on monday

--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716


--

Dave Peterson
  #9   Report Post  
Old January 30th 06, 10:11 AM posted to microsoft.public.excel.worksheet.functions
neowok
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week


hmmm i think that would work better. how would i get the date of the
friday in that week? because i would need those dates anyway as the
axis labels.


--
neowok
------------------------------------------------------------------------
neowok's Profile: http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716

  #10   Report Post  
Old January 30th 06, 10:28 AM posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default need to convert list of dates to count no. of dates by week

=A1+(6-WEEKDAY(A1))

gets the Friday the date in A1

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"neowok" wrote in
message ...

hmmm i think that would work better. how would i get the date of the
friday in that week? because i would need those dates anyway as the
axis labels.


--
neowok
------------------------------------------------------------------------
neowok's Profile:

http://www.excelforum.com/member.php...fo&userid=5940
View this thread: http://www.excelforum.com/showthread...hreadid=505716





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 No. of times Dates are repeated Mandeep Dhami Excel Discussion (Misc queries) 6 December 8th 05 03:55 AM
count date occurances in range of dates... Alex Excel Worksheet Functions 2 July 27th 05 04:15 PM
user defined function Brian Rogge Excel Worksheet Functions 5 May 23rd 05 06:21 PM
have dates entered from a list of data into an excel template Diane Excel Discussion (Misc queries) 1 December 28th 04 07:33 PM
I have a list of dates that I need to count based on a date range ejb030353 Excel Worksheet Functions 4 November 24th 04 03:27 PM


All times are GMT +1. The time now is 10:00 PM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017