Return a Date for a specific week

bobgrand

Board Regular
Joined
Apr 14, 2008
Messages
244
Office Version
  1. 365
Platform
  1. Windows
Hello all,

We receive date data in a weird format YYWK. WK represents the Week of the year. Is there a formula that will return a date for the work week of the year.
Example: 1824 - 18 = 2018 - 24 = Work Week 24 of the year would be Monday 06/18/2018.

Any help would be greatly appreciated.

Bob
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Based on your example, try the following:
=DATE(2000+LEFT(A1,2),1,MID(A1,3,2)*7)+1
 
Upvote 0
Neil,

Thank you so much. That works perfect.

Unfortunately that was only half the battle. I now need the reverse of this. I have a date and need to know which week of the year that is. If you can help with this that would be awesome.

Thank you
Bob
 
Upvote 0
Code:
'***************************************************************************************************
'* ISO Week Number
'* International Standards Organization (ISO)
'* The ISO 8601 definition for week 01 is the week with the year's first Thursday in it
'* ISO definition: [URL]http://en.wikipedia.org/wiki/ISO_week_date[/URL]
'* Code: [URL]http://www.cpearson.com/excel/WeekNumbers.aspx[/URL]
'*
Function WeekNum_ISO(InputDate As Date) As Integer
    WeekNum_ISO = 0
    If InputDate <> 0 Then  'Returns week 52 for date = 0
        WeekNum_ISO = DatePart("ww", InputDate, vbMonday, vbFirstFourDays)
        If WeekNum_ISO = 53 And day(InputDate) > 28 And Weekday(InputDate) = vbMonday Then WeekNum_ISO = 1  'Bugfix 2019
    End If
End Function
 
Upvote 0
Thank you Johnny, I will give this a try but for the time being I created a separate tab ColA 1 thru 52 ColB Date 1/8/2018 + 7 carried down to give me the first Monday date of each week. I will v-lookup against this to get the dates into the sheet.



11/8/2018
21/15/2018
31/22/2018
41/29/2018
52/5/2018
62/12/2018
72/19/2018
82/26/2018
93/5/2018
103/12/2018

<colgroup><col><col></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,403
Messages
6,119,309
Members
448,886
Latest member
GBCTeacher

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top