Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Line or bar graphs for tracking stocks profit and loss. | Charts and Charting in Excel | |||
I need week number in excell from a date, first week must be mini. | Excel Discussion (Misc queries) | |||
Dynamic Column VlookUps Based on Week Number | Excel Worksheet Functions | |||
Convert week number into calendar month? | Excel Worksheet Functions | |||
first week of year - according to european standard | Excel Worksheet Functions |