Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default start/end dates of a week given just the weeknum() value

Hi

I see weeknum() can return a week number given a date.
However I need to reverse this procedure and calculate the START and END
dates for a week given just the weeknumber [weeknum() ] for the week
concerned

for example, given

week number 50 I need to return Dec 5 (start) and Dec 11 (end)
week number 51 I need to return Dec 12 (start) and Dec 18 (end)

thanks , David

  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default start/end dates of a week given just the weeknum() value

Maybe this..........
With your weeknumber in A1,
This in B1
=TEXT(38353+(A1*7)-7,"mm/dd/yy")
This in C1
=TEXT(38353+(A1*7)-1,"mm/dd/yy")

Vaya con Dios,
Chuck, CABGx3






"David" wrote:

Hi

I see weeknum() can return a week number given a date.
However I need to reverse this procedure and calculate the START and END
dates for a week given just the weeknumber [weeknum() ] for the week
concerned

for example, given

week number 50 I need to return Dec 5 (start) and Dec 11 (end)
week number 51 I need to return Dec 12 (start) and Dec 18 (end)

thanks , David

  #3   Report Post  
Posted to microsoft.public.excel.misc
Earl Kiosterud
 
Posts: n/a
Default start/end dates of a week given just the weeknum() value

David,

For the start date:
=(A2-2)*7+DATEVALUE("Jan 3, 2005")

end date:
=(A2-2)*7+DATEVALUE("Jan 3, 2005") + 6

These are hard-coded for year 2005. The jan 3 date is the date on which
week 2 starts for the year of interest. To make this work over various
years will take more.

Earl Kiosterud
www.smokeylake.com

"David" wrote in message
...
Hi

I see weeknum() can return a week number given a date.
However I need to reverse this procedure and calculate the START and END
dates for a week given just the weeknumber [weeknum() ] for the week
concerned

for example, given

week number 50 I need to return Dec 5 (start) and Dec 11 (end)
week number 51 I need to return Dec 12 (start) and Dec 18 (end)

thanks , David



  #4   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default start/end dates of a week given just the weeknum() value

thanks Earl

"Earl Kiosterud" wrote:

David,

For the start date:
=(A2-2)*7+DATEVALUE("Jan 3, 2005")

end date:
=(A2-2)*7+DATEVALUE("Jan 3, 2005") + 6

These are hard-coded for year 2005. The jan 3 date is the date on which
week 2 starts for the year of interest. To make this work over various
years will take more.

Earl Kiosterud
www.smokeylake.com

"David" wrote in message
...
Hi

I see weeknum() can return a week number given a date.
However I need to reverse this procedure and calculate the START and END
dates for a week given just the weeknumber [weeknum() ] for the week
concerned

for example, given

week number 50 I need to return Dec 5 (start) and Dec 11 (end)
week number 51 I need to return Dec 12 (start) and Dec 18 (end)

thanks , David




  #5   Report Post  
Posted to microsoft.public.excel.misc
David
 
Posts: n/a
Default start/end dates of a week given just the weeknum() value

thanks Chuck


"CLR" wrote:

Maybe this..........
With your weeknumber in A1,
This in B1
=TEXT(38353+(A1*7)-7,"mm/dd/yy")
This in C1
=TEXT(38353+(A1*7)-1,"mm/dd/yy")

Vaya con Dios,
Chuck, CABGx3






"David" wrote:

Hi

I see weeknum() can return a week number given a date.
However I need to reverse this procedure and calculate the START and END
dates for a week given just the weeknumber [weeknum() ] for the week
concerned

for example, given

week number 50 I need to return Dec 5 (start) and Dec 11 (end)
week number 51 I need to return Dec 12 (start) and Dec 18 (end)

thanks , David

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
Xmas Week Dates rac Excel Discussion (Misc queries) 4 July 23rd 05 05:41 PM
weeknum function says jan1=week1, mod to first 4 day week needed sam Excel Discussion (Misc queries) 3 June 13th 05 04:05 PM
user defined function Brian Rogge Excel Worksheet Functions 5 May 23rd 05 06:21 PM
Rouding Dates to beginning of a week Peter W Excel Discussion (Misc queries) 3 February 15th 05 11:47 PM
How do I ensure dates inputted are during the work week? Jim Johnson Excel Worksheet Functions 3 October 29th 04 08:25 AM


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