Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How can I convert a date format to an ISO week format (in EXCEL)?
|
#2
|
|||
|
|||
Hi ELI See http://www.rondebruin.nl/isodate.htm -- Regards Ron de Bruin http://www.rondebruin.nl "ELI" wrote in message ... |
#3
|
|||
|
|||
On Wed, 6 Jul 2005 08:34:03 -0700, ELI wrote:
You can use this UDF: =============== 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 ================= To enter it, <alt-F11 opens the VB Editor. Ensure your project is highlighted in the Project Explorer window, then Insert/Module and paste the code into the window that opens. To use it: =ISOWeeknum(date) will give the ISO compliant weeknumber for any date. 'date' may be a cell reference. --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I keep the date from changing format in a mail merge? | Excel Discussion (Misc queries) | |||
How to convert string to a date | Excel Worksheet Functions | |||
How do I convert a number formated as a date to text in Excel? | Excel Discussion (Misc queries) | |||
Date Format Question | Excel Discussion (Misc queries) | |||
Custom Date format ie. 01.01.05 W1 (W1 is week 1) | Excel Discussion (Misc queries) |