1st monday

Trevor3007

Well-known Member
Joined
Jan 26, 2017
Messages
667
Office Version
  1. 365
Platform
  1. Windows
hi,

is it viable to have a formula to show the 1st monday of a month as a date based on the date in a2?

For example

A2 B2 (1st monday of month)
1/10/18 1/10/18

8/10/18 1/10/18

5/11/18 5/11/18

12/11/18 5/11/18


MTIA & for your time today.
KR
Trevor3007:cool:
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
is it viable to have a formula to show the 1st monday of a month as a date based on the date in a2?

For example

A2 B2 (1st monday of month)
1/10/18 1/10/18

8/10/18 1/10/18

5/11/18 5/11/18

12/11/18 5/11/18

Give this formula a try...

=DATE(YEAR(A2),MONTH(A2),8)-WEEKDAY(DATE(YEAR(A2),MONTH(A2),6))
 
Upvote 0
Try:

=8-WEEKDAY(EOMONTH(A2,-1),2)+EOMONTH(A2,-1)
I like this formula approach (less than half the function calls that my formula requires).

It looks like this formula approach can be generalized to find the Nth such-and-such day of the week as follows...

=1+7*Nth-WEEKDAY(EOMONTH(A2,-1),10+DoW)+EOMONTH(A2,-1)

where Nth would be the occurrence number (1 for first, 2 for second, etc.) for the DoW (day of week)(1 for Monday, 2 for Tuesday, etc.).
 
Upvote 0
I like this formula approach (less than half the function calls that my formula requires).

It looks like this formula approach can be generalized to find the Nth such-and-such day of the week as follows...

=1+7*Nth-WEEKDAY(EOMONTH(A2,-1),10+DoW)+EOMONTH(A2,-1)

where Nth would be the occurrence number (1 for first, 2 for second, etc.) for the DoW (day of week)(1 for Monday, 2 for Tuesday, etc.).
Here is an alternate generalized function for those who have the WORKDAY.INTL function available to them...

=WORKDAY.INTL(A2-DAY(A2),Nth,REPLACE("1111111",DoW,1,0))

As before, Nth would be the occurrence number (1 for first, 2 for second, etc.) for the DoW (day of week)(1 for Monday, 2 for Tuesday, etc.).
 
Upvote 0
Here is an alternate generalized function for those who have the WORKDAY.INTL function available to them...

=WORKDAY.INTL(A2-DAY(A2),Nth,REPLACE("1111111",DoW,1,0))

As before, Nth would be the occurrence number (1 for first, 2 for second, etc.) for the DoW (day of week)(1 for Monday, 2 for Tuesday, etc.).

Hi Rick,

thank you very much for your help.

Your formula works great until I put in 29/10/18 ... I should of stated that the particular worksheet is for timesheets . So when I put in the date 29/10/18 it returns 1/10/18 , but should return 5/11/18. Is this viable and if so what is the magic formula etc?


Again I thank you for your help & my apologies for not stating this in my original request for you assistance.

KR
Trevor3007
 
Upvote 0
Please define when you require the 1st Monday of the current month and when you require the 1st monday of the next month.

Please evaluate


Excel 2010
ABCD
1529-Oct-18Mon 01-Oct-18
1629-Oct-18Mon 05-Nov-18
3a
Cell Formulas
RangeFormula
D15=WORKDAY.INTL(A15-DAY(A15),1,"0111111")
D16=WORKDAY.INTL(A16,1,"0111111")
 
Upvote 0
Please define when you require the 1st Monday of the current month and when you require the 1st monday of the next month.

Please evaluate

Excel 2010
ABCD
1529-Oct-18Mon 01-Oct-18
1629-Oct-18Mon 05-Nov-18

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
3a

Worksheet Formulas
CellFormula
D15=WORKDAY.INTL(A15-DAY(A15),1,"0111111")
D16=WORKDAY.INTL(A16,1,"0111111")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

good evening dave,

thank you for your help & D16 is the one I would use.

KR
Trevor3007
 
Upvote 0
Hi Rick,

Your formula works great until I put in 29/10/18 ... I should of stated that the particular worksheet is for timesheets . So when I put in the date 29/10/18 it returns 1/10/18 , but should return 5/11/18. Is this viable and if so what is the magic formula etc?
I am not sure if you have your answer yet or not, but I am curious... how do you know when the first Monday of the month for the specified date should be returned and when it should be ignored and the first Monday of the next month should be returned instead? What is the criteria you are using to make that decision?
 
Upvote 0
I am not sure if you have your answer yet or not, but I am curious... how do you know when the first Monday of the month for the specified date should be returned and when it should be ignored and the first Monday of the next month should be returned instead? What is the criteria you are using to make that decision?

Morning Rick,

thanks for your help. Please use link below:-

https://www.amazon.co.uk/clouddrive/share/0wQ4mjCdxysmH8zaTxXU6oM1fIVv2hBOFWlgfbUsYxF


A2 is inputted manual weekly, at present b2 is also inputted manually but only the 1st monday in the period (so for October, it is 1/10/18)

from c2 - h2 these have various formulas and are triggered from b2.

hoping it makes sense. have a great day
KR
Trevor3007
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top