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:
 
Rick and I both asked how you determine whether you want the date for the current or subsequent month.
if you specify the criteria, we can probably provide a formula.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
In the examples below, we want to show the first Monday if the date is less than or equal to 21.
If the day in the referenced cell is greater than 21, show the first Monday in the next month.

You can choose the formula that you prefer and hopefully you can customize it to meet your requirements.


Excel 2010
ABC
24-Oct-18Mon 01-Oct-18Mon 01-Oct-18
322-Oct-18Mon 05-Nov-18Mon 05-Nov-18
4
3a
Cell Formulas
RangeFormula
B2=IF(DAY(A2)>21,WORKDAY.INTL(EOMONTH(A2,0),1,"0111111"),WORKDAY.INTL(A2-DAY(A2),1,"0111111"))
C2=WORKDAY.INTL(MAX(A2-DAY(A2),(DAY(A2)>21)*(EOMONTH(A2,0))),1,"0111111")
 
Upvote 0
In the examples below, we want to show the first Monday if the date is less than or equal to 21.
If the day in the referenced cell is greater than 21, show the first Monday in the next month.

You can choose the formula that you prefer and hopefully you can customize it to meet your requirements.

Excel 2010
ABC
24-Oct-18Mon 01-Oct-18Mon 01-Oct-18
322-Oct-18Mon 05-Nov-18Mon 05-Nov-18
4

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

Worksheet Formulas
CellFormula
B2=IF(DAY(A2)>21,WORKDAY.INTL(EOMONTH(A2,0),1,"0111111"),WORKDAY.INTL(A2-DAY(A2),1,"0111111"))
C2=WORKDAY.INTL(MAX(A2-DAY(A2),(DAY(A2)>21)*(EOMONTH(A2,0))),1,"0111111")

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

<tbody>
</tbody>

evening Dave,

thank you for your help. I used
=WORKDAY.INTL(MAX(A2-DAY(A2),(DAY(A2)>21)*(EOMONTH(A2,0))),1,"0111111")

and works great.

but.... on the screen shot link I send to you , cell f2 tells me what number it is in the applicable pay period.
for 29/10/18 it should be 1 , but returns 5

formula used is
=IF(WEEKDAY(A2,2) - DAY(A2) >= 5,WEEKNUM(DATE(YEAR(A2),MONTH(A2),0),2) - WEEKNUM(DATE(YEAR(A2),MONTH(A2)-1,1),2)
+ (WEEKDAY(DATE(YEAR(A2),MONTH(A2)-1,1),2) < 6),
WEEKNUM(A2,2) - WEEKNUM(DATE(YEAR(A2),MONTH(A2),1),2)
+ (WEEKDAY(DATE(YEAR(A2),MONTH(A2),1),2) < 6))




any ideas & thank you for your help...

****** id="cke_pastebin" style="position: absolute; top: -1.52588e-05px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
=WORKDAY.INTL(MAX(A2-DAY(A2),(DAY(A2)>21)*(EOMONTH(A2,0))),1,"0111111")

<tbody>
</tbody>
</body>
 
Upvote 0
1. I did not open your file. Security concerns.

2. I do not know if your latest question relates at all to your original question. A2 is your input cell.

3. You may want to provide a clear example, information, and expected results.
 
Upvote 0
Rick and I both asked how you determine whether you want the date for the current or subsequent month.
if you specify the criteria, we can probably provide a formula.

Hi,
thank you for your reply & sorry for my late reply, email issue.

I am sure I replied to you both...my sincere apologies if either have not received. Thanks you both.


KR
Trevor3007
 
Upvote 0
Hi Rick,

I am unsure if I thanked you for your recent help. My sincere apologies & a big
THANK YOU .

KR
Trevor3007
 
Upvote 0
1. I did not open your file. Security concerns.

2. I do not know if your latest question relates at all to your original question. A2 is your input cell.

3. You may want to provide a clear example, information, and expected results.


Hi Dave

just to say that the link is safe & have used often . It will take you to my Amazon drive which is where the screen shot is located.

KR
Trevor3007
 
Upvote 0

Forum statistics

Threads
1,214,553
Messages
6,120,182
Members
448,948
Latest member
spamiki

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