+ Reply to Thread
Results 1 to 5 of 5

Return the week number based on when Jan 1 started

  1. #1
    Registered User
    Join Date
    09-24-2021
    Location
    Edson, AB, Canada
    MS-Off Ver
    365
    Posts
    11

    Return the week number based on when Jan 1 started

    Hi

    I have built an interactive calendar that will change when a new year in entered. I also want to identify the week number and have it change with the year. The first week of the year would be one where Jan 1 is on a Wednesday or earlier.
    I tried using WEEKNUM(C7,1) but it only works correctly when Jan 1 is a Sunday. If Jan 1 is on a Monday it counts that week ae WEEK 53 and the second week shows as WEEK 2 .
    In my sample if you enter year 2017 it works perfectly, but if you put in 2018 or higher (up to 2024) it does not work.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    684

    Re: Return the week number based on when Jan 1 started

    that is the european way, ISO-week ???
    Jan 4 is always in week 1 !

    =WEEKNUMMER(C7,21)
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  3. #3
    Valued Forum Contributor
    Join Date
    01-05-2013
    Location
    Singapore/China
    MS-Off Ver
    H&B 2016
    Posts
    1,150

    Re: Return the week number based on when Jan 1 started

    See if ISOWEEKNUM gives you the correct solution you are looking for.

    ISOWEEKNUM.png

  4. #4
    Registered User
    Join Date
    09-24-2021
    Location
    Edson, AB, Canada
    MS-Off Ver
    365
    Posts
    11

    Re: Return the week number based on when Jan 1 started

    Thank you

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider (Windows 11 64-bit)
    Posts
    53,027

    Re: Return the week number based on when Jan 1 started

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

+ 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] Finding week number based on custom week ranges
    By jhensley_excel in forum Excel General
    Replies: 4
    Last Post: 11-06-2019, 02:33 PM
  2. [SOLVED] return week number based on sum value
    By shido in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-12-2015, 08:33 PM
  3. Replies: 28
    Last Post: 07-17-2015, 07:32 AM
  4. Replies: 5
    Last Post: 09-01-2014, 03:55 PM
  5. Replies: 5
    Last Post: 09-25-2013, 01:48 PM
  6. [SOLVED] Date Formula to Return Week Number in Current Month based on Reporting Period
    By jeversf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2013, 12:10 PM
  7. [SOLVED] Calculating a Date Based on Year, Week Number and Day of the Week
    By amy in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-23-2005, 11:42 AM

Tags for this Thread

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