+ Reply to Thread
Results 1 to 9 of 9

Determine Week Start Date From Year And Number

  1. #1
    Forum Contributor
    Join Date
    12-24-2010
    Location
    South Africa
    MS-Off Ver
    Office 2003; Office 2007; Office 2010 (Prefered)
    Posts
    102

    Determine Week Start Date From Year And Number

    Hey All,

    So once again I need some help from the Excel Gurus. I'm wanting to determine the starting date of a week. Each week will need to always start on a Monday in this example.

    I want to derive the week starting date from two cells namely:
    A cell that contains a number between 1 -52 (Represent week numbers)
    The next cell will contain years e.g. 2013, 2014, 2015, 2016, etc.

    How can I determine the week start date by CONCATENATING these two fields to return a date?

    Thanks again :-).

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Determine Week Start Date From Year And Number

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    where myYear is the cell containing the year number, and myWeek is the cell containing the week number.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Determine Week Start Date From Year And Number

    Can you clarify exactly when the first week of a year begins?
    Is a week defined as Sunday through Saturday? (something else?)
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Determine Week Start Date From Year And Number

    If you are using ISO week numbers whereby week 1 starts on the first Monday on or after 29th December then you can find the date with a tweak to Olly's suggestion, i.e.

    =DATE(myYear,1,7*myWeek-2)-WEEKDAY(DATE(myYear,1,3))
    Audere est facere

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Determine Week Start Date From Year And Number

    IF A2=week No and B2= Year in C2 Put This To get date
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-24-2010
    Location
    South Africa
    MS-Off Ver
    Office 2003; Office 2007; Office 2010 (Prefered)
    Posts
    102

    Re: Determine Week Start Date From Year And Number

    Monday to Sunday is one week.

    Thanks

  7. #7
    Forum Contributor
    Join Date
    12-24-2010
    Location
    South Africa
    MS-Off Ver
    Office 2003; Office 2007; Office 2010 (Prefered)
    Posts
    102

    Re: Determine Week Start Date From Year And Number

    Quote Originally Posted by daddylonglegs View Post
    If you are using ISO week numbers whereby week 1 starts on the first Monday on or after 29th December then you can find the date with a tweak to Olly's suggestion, i.e.

    =DATE(myYear,1,7*myWeek-2)-WEEKDAY(DATE(myYear,1,3))

    I just wanted to clarify what you meant by on 29 December. Does this mean is I use your tweak, that week one will start from 29 December of the previous year, provided 29 December is a Monday?

    Would this also be true if the Monday is on 30 / 31 December of the previous year?

  8. #8
    Forum Contributor
    Join Date
    12-24-2010
    Location
    South Africa
    MS-Off Ver
    Office 2003; Office 2007; Office 2010 (Prefered)
    Posts
    102

    Re: Determine Week Start Date From Year And Number

    Thanks to everyone for their help here. The formula really helped me solve my problem. For an additional reference, if someone wants to use this formula and then return the week number from the result set you would then use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Determine Week Start Date From Year And Number

    Quote Originally Posted by SalientAnimal View Post
    I just wanted to clarify what you meant by on 29 December. Does this mean is I use your tweak, that week one will start from 29 December of the previous year, provided 29 December is a Monday?

    Would this also be true if the Monday is on 30 / 31 December of the previous year?
    Yes - with ISO week numbers week 1 always starts with the Monday in the period 29 Dec - 4 Jan. How is week 1 defined in your system?

    I doubt if WEEKNUM()-1 will get the correct week number in all years, it may work this year but for some years it probably tallies with WEEKNUM

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. week number based on year start 01/10
    By tony0710 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-02-2014, 12:21 PM
  2. Replies: 6
    Last Post: 05-08-2013, 01:46 PM
  3. Input a year to determine the start date for 4-4-5 Calendar Year.
    By mak1176 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-25-2013, 10:34 AM
  4. week start date and end date based on week number
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2009, 12:39 PM
  5. Replies: 1
    Last Post: 08-23-2005, 11:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1