Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Return the Date of a certain Day Each Month

I have data that needs to be updated in a system on certain days in a
month as required by contract.

Here is an example of something that I am currently doing that is
similar to my question

I have something that needs to be updated every Tuesday
In cell A1 there is the =Today() function. Today is Wednesday 2/28/07
Cell B2 "Current Weekday" = Weekday(A1) = 4
Cell C2 "Desired Weekday" = 3 (for Tuesday)
Cell D2 "Coefficient" = C2-B2 = -1
So.. the Update date would be A1+D2 = (2/28/07 + -1) = 2/27/07
(Tuesday of current week)

Now my question is what if I have something that needs to be updated
on the Second Monday of every month?

How can I set up a formula that will return the Date of the 2nd Monday
for the current month (based on =Today())

Thank you!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Return the Date of a certain Day Each Month

In B1 enter the year:
2007

In B2 enter the month formula:
=MONTH(TODAY())

In B3 enter which (1 for the first):
2

In B4 enter the daynumber (1 for Sunday)
2

So 2,2 in B3:B4 means the second Monday

then:

=DATE(B1,B2,1+((B3-(B4=WEEKDAY(DATE(B1,B2,1))))*7)+(B4-WEEKDAY(DATE(B1,B2,1))))


will display:
2/12/2007

--
Gary's Student
gsnu200708


"Matt.Russett" wrote:

I have data that needs to be updated in a system on certain days in a
month as required by contract.

Here is an example of something that I am currently doing that is
similar to my question

I have something that needs to be updated every Tuesday
In cell A1 there is the =Today() function. Today is Wednesday 2/28/07
Cell B2 "Current Weekday" = Weekday(A1) = 4
Cell C2 "Desired Weekday" = 3 (for Tuesday)
Cell D2 "Coefficient" = C2-B2 = -1
So.. the Update date would be A1+D2 = (2/28/07 + -1) = 2/27/07
(Tuesday of current week)

Now my question is what if I have something that needs to be updated
on the Second Monday of every month?

How can I set up a formula that will return the Date of the 2nd Monday
for the current month (based on =Today())

Thank you!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Return the Date of a certain Day Each Month

On 28 Feb 2007 09:57:14 -0800, "Matt.Russett" wrote:

I have data that needs to be updated in a system on certain days in a
month as required by contract.

Here is an example of something that I am currently doing that is
similar to my question

I have something that needs to be updated every Tuesday
In cell A1 there is the =Today() function. Today is Wednesday 2/28/07
Cell B2 "Current Weekday" = Weekday(A1) = 4
Cell C2 "Desired Weekday" = 3 (for Tuesday)
Cell D2 "Coefficient" = C2-B2 = -1
So.. the Update date would be A1+D2 = (2/28/07 + -1) = 2/27/07
(Tuesday of current week)

Now my question is what if I have something that needs to be updated
on the Second Monday of every month?

How can I set up a formula that will return the Date of the 2nd Monday
for the current month (based on =Today())

Thank you!


In general, the 2nd NDay of the month would be given by the formula:

=A1+15-DAY(A1)-WEEKDAY(A1-DAY(A1)+8-DOW)

Where A1 is some date in the month of concern, and DOW is day of the week
(Sun=1, Mon=2, ...)

So for your example, 2nd Monday of the current month:

=TODAY()+15-DAY(TODAY())-WEEKDAY(TODAY()-DAY(TODAY())+6)


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a formula that will return only the month from a date? birdgirl31 Excel Discussion (Misc queries) 5 July 4th 09 07:48 AM
Return Month & Year of Date Value WildWill Excel Discussion (Misc queries) 1 November 17th 08 04:43 PM
return month from a date Dave F Excel Discussion (Misc queries) 6 November 12th 06 05:12 PM
Auto return month as text date martins Excel Discussion (Misc queries) 1 March 19th 06 02:59 PM
In Excel How do I return the Month for a specific date Ashok Natarajan Excel Discussion (Misc queries) 1 January 23rd 06 09:05 AM


All times are GMT +1. The time now is 10:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"