+ Reply to Thread
Results 1 to 6 of 6

Formula to get Week Number and Year(last, current and next)

  1. #1
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Formula to get Week Number and Year(last, current and next)

    I have 68 Columns, broken up into 3 sections by year
    Columns A-H will have data from the last 8 weeks of last year
    Columns I-BH will have data from the 52 weeks of this year
    Columns BI-BP will have data from the first 8 weeks of next year

    What I'd like to do is come up with a formula that will combine the weeknumber and the appropriate year. Ideally I'm gonna use this as a template for years to come so last year won't always be 2018.

    Current formulas are:
    COLUMNS A-H
    ="Week "&WEEKNUM(B6) through to AY6
    Ideally I'd like it to say "Week 45 2018"


    COLUMNS I-BH
    ="Week "&WEEKNUM('WFA BI - Daily Performance Rev'!BM6)&" "&TEXT(DATE(YEAR(TODAY()), 1, 1),"yyyy")
    through to OY6
    Ideally I'd like it to say "Week 1 2019"

    COLUMNS BI-BP
    same as columns A-H, with different cell references instead of B6
    Ideally I'd like it to say "Week 1 2020"

    I'd also like a macro that would jump to today's weeknum. It seems to work when I manually write "Week 1 2019" for example but the minute I put a formula in, it no longer worked.

    Anyone have any ideas?
    Last edited by Wheelie686; 04-01-2019 at 02:08 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Week Numbers

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Formula to get Week Number and Year(last, current and next)

    Thread title has been updated to better indicate what I'd like help with

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Formula to get Week Number and Year(last, current and next)

    Thank you.

  5. #5
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    327

    Re: Formula to get Week Number and Year(last, current and next)

    Anyone able to help?

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,534

    Re: Formula to get Week Number and Year(last, current and next)

    Perhaps this will help although it requires the user to select a hyperlink to the current week.
    Row 1, which may be moved down the sheet and/or hidden for aesthetic purposes is populated as follows
    1. Cell I1 =DATE(YEAR(TODAY()),1,1)
    2. Cells H1:A1 =I1-7
    3. Cells J1:BP1 =I1+7
    Row 2 is populated using: ="Week "&WEEKNUM(A1)&" "&YEAR(A1)
    Cell A6 displays the current week number using: ="Week "&WEEKNUM(TODAY())&" "&YEAR(TODAY())
    Cell B6 displays the cell in row 2 that contains the current week number using: =ADDRESS(2,MATCH(A6,A2:BP2,0))
    Cell C6 contains a hyperlink to the cell in row 2 using: =HYPERLINK("[Book1(Wheelie686).xlsx]Sheet1!"&CELL("contents",B6))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Count Week numbers given start and finish week number
    By Vassen in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-30-2016, 01:59 AM
  2. Replies: 8
    Last Post: 06-28-2014, 03:26 PM
  3. How to: identify repeat offenders within a 3 week period (week per week basis)
    By Heloc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2012, 12:43 AM
  4. Week Numbers
    By Teppid in forum Excel General
    Replies: 1
    Last Post: 02-04-2009, 09:01 AM
  5. week numbers
    By stevesunfold in forum Excel General
    Replies: 3
    Last Post: 07-13-2008, 08:54 AM
  6. [SOLVED] Week Numbers
    By Observer in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-08-2006, 10:15 AM
  7. [SOLVED] Week Numbers
    By gregork in forum Excel General
    Replies: 2
    Last Post: 02-19-2005, 10:06 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