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.
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:
|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:
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:
(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).
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
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!