Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Week Numbers
If I enter a week number in a cell I want to have a formula that returns
the end date for that date (based on ISO week numbers) GK |
#2
|
|||
|
|||
Hi gregork
This will depend on the Year More info about week numbers you can find here http://www.rondebruin.nl/weeknumber.htm -- Regards Ron de Bruin http://www.rondebruin.nl "gregork" wrote in message ... If I enter a week number in a cell I want to have a formula that returns the end date for that date (based on ISO week numbers) GK |
#3
|
|||
|
|||
On Sat, 19 Feb 2005 23:15:07 +1300, "gregork" wrote:
If I enter a week number in a cell I want to have a formula that returns the end date for that date (based on ISO week numbers) GK You can do that with a UDF. To enter this UDF, <alt-F11 opens the VB Editor. Ensure your project is highlighted in the project explorer window, then Insert/Module and paste the code below into the window that opens. Use this by entering the formula =ISOWeeknum(dt) where dt is either a date or a cell reference containing a date. ================================= 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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting Numbers to Text properly | Excel Discussion (Misc queries) | |||
How do I use week numbers for sub-totalling? | Excel Discussion (Misc queries) | |||
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) | |||
first week of year - according to european standard | Excel Worksheet Functions |