Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to convert week number to date or vice versa in Excel?

Is there a way to get the week number from a given date or extract the date range from a specific week number and year in Excel? To solve this task, the following formulas may do you a favor.

Convert week number to date with formulas

Convert date to week number with formulas

One click to convert multiple non-standard formatting dates/numbers/text to normal dates in Excel

Kutools for Excel's Convert to Date utility can help you easily identify and convert non-standard dates or numbers (yyyymmdd) or text to normal dates with only one click in Excel. Full Feature Free Trial 30-day!
ad convert to date 1

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubble Convert week number to date with formulas

Supposing I have a random year and week number which are 2015 and 15 in a worksheet as following screenshot shown, and now I want to find out the specific dates from Monday to Sunday by this given week number.

To calculate the date range by the specific week number, you can use the following formulas:

1. Select a blank cell you will return the start date (in our case we select the Cell B5), enter the formula: =MAX(DATE(B1,1,1),DATE(B1,1,1)-WEEKDAY(DATE(B1,1,1),2)+(B2-1)*7+1), and press the Enter key. See screenshot below:

2. Select another blank cell you will return the end date (in our case we select the Cell B6), enter =MIN(DATE(B1+1,1,0),DATE(B1,1,1)-WEEKDAY(DATE(B1,1,1),2)+B2*7), and press the Enter key. See screenshot below:

note ribbon Formula is too complicated to remember? Save the formula as an Auto Text entry for reusing with only one click in future!
Read more…     Free trial

Note: In both formulas above, B1 contains a year and B2 is a specified week number, you can change the arguments to your need).

3. As you see, both formulas return numbers instead of dates. Keep selecting both calculating results, and click Home > Number Format box > Short Date to change the numbers to dates. See screenshot below:


arrow blue right bubble Convert date to week number with formulas

On the other hand, you can also apply the WEEKNUM function to convert a date to corresponding week number.

1. Select a blank cell you will return the week number, enter this formula: =WEEKNUM(B1,1), and press the Enter key. See screenshot:

Notes:

(1) In above formula, B1 contains the date that you want to use.

(2) If you need to return the week number from a date which begins in Monday, please apply this formula: =WEEKNUM(B1,2).


arrow blue right bubbleRelated articles:

How to count the number of specific weekdays between two dates in Excel?

How to add / subtract days / months / years to date in Excel?


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Biswajit · 3 months ago
    Hi please help me.

    Suppose we are considering Date 1 to 7 is week 1 and 8 to 14 is week 2. Can you please help me out how can i use if function to calculate week. I have tried but not able to get the correct result.
  • To post as a guest, your comment is unpublished.
    jtaylorg91 · 7 months ago
    Thank YOU!!!!
  • To post as a guest, your comment is unpublished.
    geoffsmile · 2 years ago
    Thank you very much!


    =CONCATENATE("Inclusive Dates: ",TEXT(MAX(DATE(TEXT(TODAY(),"yyyy"),1,1),DATE(TEXT(TODAY(),"yyyy"),1,1)-WEEKDAY(DATE(TEXT(TODAY(),"yyyy"),1,1),2)+(WEEKNUM(TODAY())-1)*7+1),"MMMM")," ",TEXT(MAX(DATE(TEXT(TODAY(),"yyyy"),1,1),DATE(TEXT(TODAY(),"yyyy"),1,1)-WEEKDAY(DATE(TEXT(TODAY(),"yyyy"),1,1),2)+(WEEKNUM(TODAY())-1)*7+1),"DD"),", ",TEXT(MAX(DATE(TEXT(TODAY(),"yyyy"),1,1),DATE(TEXT(TODAY(),"yyyy"),1,1)-WEEKDAY(DATE(TEXT(TODAY(),"yyyy"),1,1),2)+(WEEKNUM(TODAY())-1)*7+1),"YYYY")," - ",TEXT(MIN(DATE(TEXT(TODAY(),"yyyy")+1,1,0),DATE(TEXT(TODAY(),"yyyy"),1,1)-WEEKDAY(DATE(TEXT(TODAY(),"yyyy"),1,1),2)+WEEKNUM(TODAY())*7),"MMMM")," ",TEXT(MIN(DATE(TEXT(TODAY(),"yyyy")+1,1,0),DATE(TEXT(TODAY(),"yyyy"),1,1)-WEEKDAY(DATE(TEXT(TODAY(),"yyyy"),1,1),2)+WEEKNUM(TODAY())*7),"DD"),", ",TEXT(MIN(DATE(TEXT(TODAY(),"yyyy")+1,1,0),DATE(TEXT(TODAY(),"yyyy"),1,1)-WEEKDAY(DATE(TEXT(TODAY(),"yyyy"),1,1),2)+WEEKNUM(TODAY())*7),"YYYY"))
  • To post as a guest, your comment is unpublished.
    seld · 2 years ago
    Date(2017;1;7 * weeknumer - 5)

    5 monday, 4 tuesday... :)
    • To post as a guest, your comment is unpublished.
      Katy · 2 years ago
      Or to make in not specific to the year 2017...
      =DATE(YEAR,1,7 * WEEKNUM - WEEKDAY(DATE(YEAR,1,7) - 2))

      2 monday, 3 tuesday,...
  • To post as a guest, your comment is unpublished.
    Lynnwood · 2 years ago
    I'm sorry folks, but I could neither understand nor make work any of the formulas above so I finally figured out the following solution:
    DATE(B1,1,1)+($A4×7)−(6−(7−WEEKDAY(DATE(B1,1,1),first-day)))

    The first part "DATE(B1,1,1)+(B2×7)" simply takes January 1 of the year and adds the number of weeks.

    The next part calculates how many days to subtract from the WEEKDAY of January 1 to get the first day of the week. This is what I finally figured out:
    6−(7−WEEKDAY(DATE(B1,1,1),first-day))
    If, for example, January 1 falls on a Sunday (day 7), then this formula become "6-(7-7)" or simply 6 - which is the number of days you need to subtract to get Monday of that week. Try other days.

    Finally, if you want to find any other day of the week, just add the WEEKDAY number minus 1 to this result. So the last day of the week (Sunday) is:
    DATE(B1,1,1)+($A4×7)−(6−(7−WEEKDAY(DATE(B1,1,1),first-day)))+(7−1)
    Which can be simplified to:
    DATE(B1,1,1)+($A4×7)−(12−(7−WEEKDAY(DATE(B1,1,1),first-day)))
    Wednesday would be:
    DATE(B1,1,1)+($A4×7)−(8−(7−WEEKDAY(DATE(B1,1,1),first-day)))
    etc.
    I hope this helps someone else who needs this both with a workable solution along with a bit of understanding of how it was arrived at!
  • To post as a guest, your comment is unpublished.
    TJ · 3 years ago
    It's a great formulas and ideal! However, it's important to point out that Excel default system week number counts from Sunday to Saturday. Adjustment is needed if the week number is extracted from Excel Weeknumber formulas.
  • To post as a guest, your comment is unpublished.
    DavidK · 4 years ago
    I am using UK date format of dd/mm/yyy
    • To post as a guest, your comment is unpublished.
      m · 4 years ago
      that shouldn't be a problem. :)

      you can handle the output 'visual' either by:
      1) encasing the entire formula in a text() function, where the second argument will be your custom date format of dd/mm/yyyy...

      or

      2) which might be easier... ctrl+1, number tab, custom, dd/mm/yyyy

      excel handles dates as whole numbers anyway... so the "output" format is very arbitrary.

      if you decide to use the first option... it'll look like this:

      =text(a1,"dd/mm/yyyy")

      instead of a1 however, use whatever formula you've devised to return the correct date you're looking for.


      Hope that helps!
      ~Cheers,
  • To post as a guest, your comment is unpublished.
    DavidK · 4 years ago
    Hi

    Thanks for this formula.

    The example works for 2015, week 15

    For 2016, week 15 the returned StartDate: 04/04/2016 Enddate:10/04/2016

    I am using Excel 2003.
    • To post as a guest, your comment is unpublished.
      Mollum · 3 years ago
      =MAX(DATE(B1,1,1),DATE(B1,1,1)-WEEKDAY(DATE(B1,1,1),2)+(B2-1)*7+4)

      =MIN(DATE(B1+1,1,0),DATE(B1,1,1)-WEEKDAY(DATE(B1,1,1),2)+B2*7+1)
    • To post as a guest, your comment is unpublished.
      Tigris1987 · 3 years ago
      I agree with DavidK, the formula to convert weeknummers into dates works for 2015 but not for 2016 (as week 1 starts on 4th of January). Is there a formula that works for all years? I am very thankful for the answer to this.
    • To post as a guest, your comment is unpublished.
      Tigris · 3 years ago
      I agree with DavidK that the formula to convert Weeknrs into dates works for 2015, but not for 2016 (as week 1 starts on 4th of January). Is it possible to have a formula that works for all years?
  • To post as a guest, your comment is unpublished.
    Cor · 5 years ago
    Thanks for the formula, i was searching for it.

    I have a Office 2010 Excel client and the formula didn't work directly. I had to change the commas to dot-commas for the formula to work for me. So it's like this:

    =MAX(DATE(G1;1;1);DATE(G1;1;1)-WEEKDAY(DATE(G1;1;1);2)+(F1-1)*7+1)

    ... where G1 is the year and F1 is the weeknumber.

    Hopefully it can help others aswell.

    Greetz,
    Cor