Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mark C
 
Posts: n/a
Default Microsofts week numbering

Can anyone tell me why Microsofts =weeknum() function does not agree with my
calendar. Excel tells me 22/06/05 is week 26, my Calendar and Diary tell me
it is week 25.

Is there a fix for this or how should I handle it?

TIA Mark


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Mark,

A complex matter. Take a look at http://www.cpearson.com/excel/weeknum.htm

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mark C" wrote in message
...
Can anyone tell me why Microsofts =weeknum() function does not agree with

my
calendar. Excel tells me 22/06/05 is week 26, my Calendar and Diary tell

me
it is week 25.

Is there a fix for this or how should I handle it?

TIA Mark




  #3   Report Post  
Mark C
 
Posts: n/a
Default

Thanks Bob, that helps

Mark

"Bob Phillips" wrote in message
...
Mark,

A complex matter. Take a look at http://www.cpearson.com/excel/weeknum.htm

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mark C" wrote in message
...
Can anyone tell me why Microsofts =weeknum() function does not agree

with
my
calendar. Excel tells me 22/06/05 is week 26, my Calendar and Diary tell

me
it is week 25.

Is there a fix for this or how should I handle it?

TIA Mark






  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 14 Dec 2004 12:15:00 +0000 (UTC), "Mark C"
wrote:

Can anyone tell me why Microsofts =weeknum() function does not agree with my
calendar. Excel tells me 22/06/05 is week 26, my Calendar and Diary tell me
it is week 25.

Is there a fix for this or how should I handle it?

TIA Mark


Your calendar and Microsoft are using different week numbering conventions.

See HELP for the convention used by the Microsoft function.

Your calendar may be using the ISO weeknumbering function. If that is the
case, you may use this UDF: =ISOWEEKNUM(date)

To use the UDF you must enter it into a VBA module.

<alt<F11 opens the VB editor.
Insert/Module and paste the code below into the window that opens.


======================
Function ISOWeeknum(dt As Date) As Integer
ISOWeeknum = DatePart("ww", dt, vbMonday, vbFirstFourDays)
If ISOWeeknum 52 Then
If DatePart("ww", dt + 7, vbMonday, vbFirstFourDays) = 2 Then
ISOWeeknum = 1
End If
End If
End Function
====================


--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
Line or bar graphs for tracking stocks profit and loss. Mocity Charts and Charting in Excel 1 January 21st 05 01:21 AM
I need week number in excell from a date, first week must be mini. jPeich Excel Discussion (Misc queries) 4 January 5th 05 01:21 AM
Dynamic Column VlookUps Based on Week Number TLK40us Excel Worksheet Functions 3 November 14th 04 03:33 PM
Convert week number into calendar month? WickyWick Excel Worksheet Functions 2 November 9th 04 09:01 PM
first week of year - according to european standard soren Excel Worksheet Functions 3 November 2nd 04 07:21 PM


All times are GMT +1. The time now is 12:49 PM.

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"