Auto calculate first Monday of the month

Marklarbear

Board Regular
Joined
Nov 6, 2003
Messages
119
Office Version
  1. 365
Platform
  1. Windows
Hi All,

In a FTE forecast spreadsheet that I maintain, I want to be able to automate how a certain date is calculated.

Scenario: On the third wedneday of each month I produce a 12 month FTE forecast. On the 1st monday of the next month the executive management meet to discuss my reccomendations based on the FTE forecast.

Issue: how (in the spreadsheet) can I get excel to automatically insert the 1st mondays date of the month based on the previous months 3rd wednesdays date???

:banghead:
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Elongated, but should work:

=DATE(IF(MONTH(A1)=12,YEAR(A1)+1,YEAR(A1)),MONTH(A1)+1,1)+IF(WEEKDAY(DATE(IF(MONTH(A1)=12,YEAR(A1)+1,YEAR(A1)),MONTH(A1)+1,1))=1,WEEKDAY(DATE(IF(MONTH(A1)=12,YEAR(A1)+1,YEAR(A1)),MONTH(A1)+1,1)),IF(WEEKDAY(DATE(IF(MONTH(A1)=12,YEAR(A1)+1,YEAR(A1)),MONTH(A1)+1,1))>2,9-WEEKDAY(DATE(IF(MONTH(A1)=12,YEAR(A1)+1,YEAR(A1)),MONTH(A1)+1,1))))

I'm sure someone will come out with a better one than this.
 
Upvote 0
Book1
ABCD
13rdWednesdayFirstMonday
221/01/20042/02/2004
318/02/20041/03/2004
417/03/20045/04/2004
521/04/20043/05/2004
Sheet1


formula:

=DATE(YEAR(EDATE(A2,1)),MONTH(EDATE(A2,1)),CHOOSE(WEEKDAY(DATE(YEAR(EDATE(A2,1)),MONTH(EDATE(A2,1)),1)),2,1,7,6,5,4,3))

...which could no doubt be shortened. edate() requires the analysis tool pack addin to be selected (tools | addins)
 
Upvote 0
Thanks for the prompt assistance...

The way that the spreadsheet has been developed, the 3rd wednesdays move across (A4, B4, C4 etc) as do the 1st mondays (A5, B5, C5 etc).

I have attempted to rework the formula to show this... but am a bit lost... Anymore assistance you can offer would be most appreciated.

:pray:
 
Upvote 0
Try another formula using regular function :

=DATE(YEAR(A1),MONTH(A1)+1,1)+IF(MOD(DATE(YEAR(A1),MONTH(A1)+1,1)-2,7)=0,0,7-MOD(DATE(YEAR(A1),MONTH(A1)+1,1)-2,7))



Regards
 
Upvote 0

Forum statistics

Threads
1,225,157
Messages
6,183,248
Members
453,152
Latest member
ChrisMd

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