We help IT Professionals succeed at work.

What date is this weeks Monday

111 Views
Last Modified: 2018-03-21
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

ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
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

CERTIFIED EXPERT
Top Expert 2016
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Rob HensonFinance Analyst
CERTIFIED EXPERT

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
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Rob HensonFinance Analyst
CERTIFIED EXPERT

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
CERTIFIED EXPERT
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
CERTIFIED EXPERT

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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions