+ Reply to Thread
Results 1 to 5 of 5

Display week numbers between 2 dates.

  1. #1
    Registered User
    Join Date
    08-22-2018
    Location
    Romania
    MS-Off Ver
    MS Office Professional Plus 2010
    Posts
    2

    Display week numbers between 2 dates.

    Hello,

    Please tell me if there are any formulas or another posibility for excel to show the week numbers between 2 dates.
    For example for 05.08.2018- 19.08.2018 to show week 32-33-34.

    Thank you!

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Display week numbers between 2 dates.

    not exactly what you asked see the below
    if you have your dates in A1 & B1 use below formula

    =WEEKNUM(A1)&" to "&WEEKNUM(B1)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    08-22-2018
    Location
    Romania
    MS-Off Ver
    MS Office Professional Plus 2010
    Posts
    2

    Re: Display week numbers between 2 dates.

    Then is is posible to make show the values between 2 numbers ? For example 34 and 37 and to show 34,35,36,37.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Display week numbers between 2 dates.

    It is possible by vba or by typing out a range of all the week numbers, that can be referenced by a formula

    https://stackoverflow.com/questions/...ween-2-numbers

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Display week numbers between 2 dates.

    I hesitate to give you this but it accomplishes your (hopefully limited) range...
    =IF(ABS(WEEKNUM(A1)-WEEKNUM(B1))>2,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(A1)+2&"-"&WEEKNUM(B1),IF(ABS(WEEKNUM(A1)-WEEKNUM(B1))>1,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(B1),WEEKNUM(A1)&"-"&WEEKNUM(B1)))
    so if the older date is in A1 and more recent date in B1 this will return 34-35-36-37 which is what you showed in post #1, if you want commas replace "-" with ","
    but it is limited for up to four week differences. For larger differences it will need more if then statements which is why I hesitate to give it to you, it gets ugly in a hurry.

    and if you reverse the order (B1 then A1) you don't need the abs part to this...
    =IF(WEEKNUM(B1)-WEEKNUM(A1)>2,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(A1)+2&"-"&WEEKNUM(B1),IF(WEEKNUM(B1)-WEEKNUM(A1)>1,WEEKNUM(A1)&"-"&WEEKNUM(A1)+1&"-"&WEEKNUM(B1),WEEKNUM(A1)&"-"&WEEKNUM(B1)))
    Last edited by Sam Capricci; 08-22-2018 at 07:42 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

+ 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. Switch dates/week numbers
    By DavidDK in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-24-2017, 07:56 AM
  2. [SOLVED] Display Previous Week Quantity next to This Week Column
    By benghee in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-05-2017, 01:34 PM
  3. [SOLVED] Looking up between 2 dates ~ then display week number.
    By countryfan_nt in forum Excel General
    Replies: 4
    Last Post: 03-21-2016, 09:03 AM
  4. Convert Dates to 2 Digit Week Numbers
    By papageorgio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2015, 09:33 PM
  5. [SOLVED] Counting how many dates in a range fall into this week and last week
    By AneelK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-08-2013, 09:38 AM
  6. Distribute dates by week numbers
    By excel90 in forum Excel General
    Replies: 4
    Last Post: 09-28-2010, 07:01 AM
  7. Display Week Dates based on a given Date
    By LordMarcus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2008, 01:38 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