+ Reply to Thread
Results 1 to 5 of 5

how to convert weeknum to start and end date of the week

  1. #1
    Registered User
    Join Date
    08-30-2009
    Location
    melbourne
    MS-Off Ver
    Excel 2019
    Posts
    34

    how to convert weeknum to start and end date of the week

    Hi,

    Since I cannot group the pivot table by week as I ticked "add this date to the to data model", what i thought was to create a weeknum and convert it into start and end date of the week. I am wondering how I can do that.

    Regards,
    MK
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 2019
    Posts
    18,273

    Re: how to convert weeknum to start and end date of the week

    Using Power Query

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    E
    1
    Date Qty Monthname Start of Week End of Week
    2
    9/8/2018
    3
    Sep
    9/2/2018
    9/8/2018
    3
    10/8/2018
    5
    Oct
    10/7/2018
    10/13/2018
    4
    11/8/2018
    1
    Nov
    11/4/2018
    11/10/2018
    5
    12/8/2018
    5
    Dec
    12/2/2018
    12/8/2018
    6
    1/8/2019
    6
    Jan
    1/6/2019
    1/12/2019
    7
    2/8/2019
    7
    Feb
    2/3/2019
    2/9/2019
    8
    3/8/2019
    3
    Mar
    3/3/2019
    3/9/2019
    9
    4/8/2019
    4
    Apr
    4/7/2019
    4/13/2019
    10
    5/8/2019
    3
    May
    5/5/2019
    5/11/2019
    11
    6/8/2019
    4
    Jun
    6/2/2019
    6/8/2019
    12
    7/8/2019
    5
    Jul
    7/7/2019
    7/13/2019
    13
    8/8/2019
    7
    Aug
    8/4/2019
    8/10/2019
    14
    9/8/2019
    8
    Sep
    9/8/2019
    9/14/2019
    15
    10/8/2019
    9
    Oct
    10/6/2019
    10/12/2019
    16
    11/8/2019
    5
    Nov
    11/3/2019
    11/9/2019
    17
    12/8/2019
    6
    Dec
    12/8/2019
    12/14/2019
    18
    1/8/2020
    5
    Jan
    1/5/2020
    1/11/2020
    19
    2/8/2020
    5
    Feb
    2/2/2020
    2/8/2020
    20
    3/8/2020
    7
    Mar
    3/8/2020
    3/14/2020
    21
    4/8/2020
    8
    Apr
    4/5/2020
    4/11/2020
    22
    5/8/2020
    9
    May
    5/3/2020
    5/9/2020
    23
    6/8/2020
    6
    Jun
    6/7/2020
    6/13/2020
    24
    7/8/2020
    5
    Jul
    7/5/2020
    7/11/2020
    Sheet: Sheet2

    Here is the Mcode

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by alansidman; 08-02-2020 at 08:46 AM.

  3. #3
    Registered User
    Join Date
    08-30-2009
    Location
    melbourne
    MS-Off Ver
    Excel 2019
    Posts
    34

    Re: how to convert weeknum to start and end date of the week

    Thanks for the example, it works for me.

    However, if I add more data in rows with different date, how do I let Excel automatically calculate the start and end of week ?

    Please advise

    Thanks
    MK

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 2019
    Posts
    18,273

    Re: how to convert weeknum to start and end date of the week

    Add the data to your original Table and then on the Data Tab, select the Refresh All Icon. Your data should update in PQ automatically and load to the sheet holding the output.

  5. #5
    Registered User
    Join Date
    08-30-2009
    Location
    melbourne
    MS-Off Ver
    Excel 2019
    Posts
    34

    Re: how to convert weeknum to start and end date of the week

    Thank you very much

+ 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. [SOLVED] Updating week number, start date of the week, and year from a column date that's populated
    By Raylou in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-28-2020, 11:11 AM
  2. [SOLVED] Getting a Week number from a text string using DATE and WEEKNUM
    By miro2021 in forum Excel General
    Replies: 4
    Last Post: 10-21-2018, 01:24 PM
  3. Year and Week number but I need to convert to the date of that weeks start
    By darrenj1471 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-07-2017, 09:57 AM
  4. Sheets for every week + start and ending date of the week
    By wimexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2012, 01:48 PM
  5. [SOLVED] Excel 2007 : Convert Weeknum to a date.
    By jacarutu in forum Excel General
    Replies: 5
    Last Post: 03-30-2012, 09:25 AM
  6. [SOLVED] Convert WeekNum to Sunday's date
    By Terri in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2006, 04:40 PM
  7. [SOLVED] start/end dates of a week given just the weeknum() value
    By David in forum Excel General
    Replies: 4
    Last Post: 12-12-2005, 11:35 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