A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Week number to date



 
 
Thread Tools Display Modes
  #11  
Old October 13th, 2003, 11:28 AM
Ron Rosenfeld
external usenet poster
 
Posts: n/a
Default Week number to date

On Mon, 13 Oct 2003 00:23:12 -0400, "Daniel.M"
wrote:

Wouldn't a "perfectly compliant ISO weeknumber scheme" start with January 1?
--ron


Oops!!

That line was should have been erased. It is obviously incorrect as you point
out. But I guess there were enough spaces that it scrolled off the bottom of
my screen and was sent out in error.

On my handspring visor (Palm compatible OS 3.1H3), week 1 of Year 2006 starts
Monday Jan 2nd.


A key bit of missing information that does, indeed, support your point.


--ron
  #12  
Old October 13th, 2003, 02:57 PM
Daniel.M
external usenet poster
 
Posts: n/a
Default Week number to date

Hi Ron,

That being the case, the proper formula for the OP's purposes would be:
=DATE(Year,1,1)-WEEKDAY(DATE(Year,1,1),3)+7*(Weeknumber-(DAY(DATE(Year,1,1)
-WEEKDAY(DATE(Year,1,1),3)+7*(Weeknumber))4))


The formula to retrieve the X Weeknumber Monday of Year YYYY (ISO-compliant) is:

=7*WeekNumber+DATE(YYYY,1,3)-WEEKDAY(DATE(YYYY,1,3))-5

Assuming this formula is in D1,
in D2: =D1+1
and so one for the other 5 days.

Regards,

Daniel M.


  #13  
Old October 14th, 2003, 02:57 AM
Ron Rosenfeld
external usenet poster
 
Posts: n/a
Default Week number to date

On Mon, 13 Oct 2003 09:57:40 -0400, "Daniel.M"
wrote:

=7*WeekNumber+DATE(YYYY,1,3)-WEEKDAY(DATE(YYYY,1,3))-5


Nice


--ron
  #14  
Old October 18th, 2003, 02:57 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default Week number to date

Tony,

Sorry, only just saw your follow-up.

This was a simple error. I added the week number * 7, but should have added
week number -1 *7.

Here's the formula

=TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*(B3-1)),"dddd dd-mm-yy") & "
to "&TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*(B3-1))+6,"dddd dd-mm-yy")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tony Ramsden" wrote in message
...
Thanks again bob

The weeks are out of sync with my palm by one week,
eg. Tommorow Monday 13 oct is week 42 according to palm, but according
to your calculations its week 41, I suppose its only a small tweek for
a man of your talents... so make it simple for me..

Thanks again


Tony



On Sat, 11 Oct 2003 11:17:20 +0100, "Bob Phillips"
wrote:

Tony,

If you put the year number in say B2 as well as the week in B3, this

works
for all years

=TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*B3),"dddd dd-mm-yy") & " to

"
&TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*B3)+6,"dddd dd-mm-yy")




  #15  
Old October 18th, 2003, 02:57 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default Week number to date

Tony,

Sorry, only just saw your follow-up.

This was a simple error. I added the week number * 7, but should have added
week number -1 *7.

Here's the formula

=TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*(B3-1)),"dddd dd-mm-yy") & "
to "&TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*(B3-1))+6,"dddd dd-mm-yy")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tony Ramsden" wrote in message
...
Thanks again bob

The weeks are out of sync with my palm by one week,
eg. Tommorow Monday 13 oct is week 42 according to palm, but according
to your calculations its week 41, I suppose its only a small tweek for
a man of your talents... so make it simple for me..

Thanks again


Tony



On Sat, 11 Oct 2003 11:17:20 +0100, "Bob Phillips"
wrote:

Tony,

If you put the year number in say B2 as well as the week in B3, this

works
for all years

=TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*B3),"dddd dd-mm-yy") & " to

"
&TEXT(DATE(B2,1,1)-WEEKDAY(DATE(B2,1,1))+2+(7*B3)+6,"dddd dd-mm-yy")




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:18 PM.


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