What date is this weeks Monday

easycapital
easycapital used Ask the Experts™
on
Dear experts,

For week number: A1 = 15
The date to be displayed in A2 for the corresponding Monday that given week.
Note that A1 can be changed and A2 is to update via a formula.

Thanks!
JP
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ShumsManaging Director/Excel VBA Developer
Distinguished Expert 2018

Commented:
Try below formula in A2 assuming its for 2017:
=(DATE(2017,1,-2)-WEEKDAY(DATE(2017,1,3))+A1*7)-WEEKDAY(DATE(2017,1,-2-WEEKDAY(DATE(2017,1,3))+A1*7-2))

Open in new window

Top Expert 2016
Commented:
Hi,

pls try
=DATE(YEAR(TODAY()),1,A1*7-(DAY(DATE(YEAR(TODAY()),1,1)+7-WEEKDAY(DATE(YEAR(TODAY()),1,1),2)))-1)-7
or 
=DATE(YEAR(TODAY()),1,A1*7-(DAY(DATE(YEAR(TODAY()),1,1)+7-WEEKDAY(DATE(YEAR(TODAY()),1,1),2)))-1)

Open in new window

Depending on the logic you want (Monday of the week or the first Monday before date)

Regards
ShumsManaging Director/Excel VBA Developer
Distinguished Expert 2018
Commented:
I would advice to have Year in B1, so you can change any Week Number in A1 or Year in B1, you will have First Monday of the week in A2, just to cross check, if date is correct, I have formula in B2 to show the day of the resulted date.

Please see attached....
Date-for-Monday-as-per-WeekNumber.xlsx
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Rob HensonFinance Analyst

Commented:
On what basis is the WEEKNUM being calculated? From Help file for the function:

Return_type      Week begins on      System
1 or omitted      Sunday                  1
2                  Monday                  1
11                  Monday                  1
12                  Tuesday                  1
13                  Wednesday            1
14                  Thursday            1
15                  Friday                  1
16                  Saturday                  1
17      Sunday      1
21      Monday      2

Once you know the basis of the WEEKNUM calculation you can use the FLOOR or CEILING functions to round the date to the beginning or end of the week and then add or subtract the relevant number of days to get to the Monday of the week.
Finance Analyst
Commented:
Ignore the above comment, reading between the lines you are wanting the nth Monday of the year, with n being set in A1. Therefore, try this:

=IF(WEEKDAY(DATE(2017,1,1),1)<=2,FLOOR(DATE(2017,1,1),7)+2,CEILING(DATE(2017,1,1),7)+2)+(A1-1)*7

This assumes that you want for year 2017, to make more flexible change the 2017 values to a cell reference containing the year.

The formula calculates on the following:

If the first day of the year is Monday or prior round back to the previous Saturday and add 2 days, if the first day of the year is Tuesday or beyond round up to the following Saturday and add 2 days. Each of these will give the first Monday of the year. Then adding A1 (weeknumber value) multiplied by 7 will give the nth Monday of the year. The weeknumber is reduced by 1 as you already have the first Monday so you only need n-1 weeks later.
Rob HensonFinance Analyst

Commented:
See attached file with basic option with fixed values in A1 and A2.

Also more flexible options in rows 14 and 15, enter year in B14 and use dropdown or enter day in C14.

Thanks
Rob
Day-of-week.xlsx
ShumsManaging Director/Excel VBA Developer
Distinguished Expert 2018

Commented:
Corrected formula for getting Monday's Date without linking so many cells and assuming current year for specified week in A1:
=(DATE(YEAR(TODAY()),1,-2)-WEEKDAY(DATE(YEAR(TODAY()),1,1))+A1*7)-WEEKDAY(DATE(YEAR(TODAY()),1,-2-WEEKDAY(DATE(YEAR(TODAY()),1,1))+A1*7-2))

Open in new window

Rob HensonFinance Analyst

Commented:
I have chosen my suggestion as I feel the logic I have used is simpler to understand.

Author

Commented:
Dear Rob,
Thanks for the solution.
Could you please make the week start on Monday instead of Sunday?
Br,
JP

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial