PC Review


Reply
Thread Tools Rate Thread

certain day of month

 
 
thomas donino
Guest
Posts: n/a
 
      11th Aug 2009
Is there a function that will return, for example, the third friday of the
month? Or does one need to create it in vba?
Thank you
 
Reply With Quote
 
 
 
 
Niek Otten
Guest
Posts: n/a
 
      11th Aug 2009
Look here:

http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"thomas donino" <(E-Mail Removed)> wrote in message
news:50DBAF1F-4A90-4FA4-86DF-(E-Mail Removed)...
> Is there a function that will return, for example, the third friday of the
> month? Or does one need to create it in vba?
> Thank you


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Aug 2009
Assuming A1 contains a date with the correct year and month, use this
formula instead

=DATE(YEAR(A1),MONTH(A1),22)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),2))

The generic version of this formula was posted originally by Peo Sjoblom and
is as follows....

=DATE(Yr,MM,1+7*Nth)-WEEKDAY(DATE(Yr,MM,8-DoW))

where nth is the number you want 1st, 2nd, 3rd etc thus in my formula 7*3
since you wanted the 3rd Monday and where DoW stands for day of the week
with Sunday starting with 1 and so on and where I put 2 for Monday. If you
want the 2nd Saturday in the month of A1 it would look like

=DATE(YEAR(A1),MONTH(A1),1+7*2)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),8-7))

--
Rick (MVP - Excel)


"thomas donino" <(E-Mail Removed)> wrote in message
news:50DBAF1F-4A90-4FA4-86DF-(E-Mail Removed)...
> Is there a function that will return, for example, the third friday of the
> month? Or does one need to create it in vba?
> Thank you


 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      11th Aug 2009
With a date in cell A1 (to pick the year and month) the below formula will do.

=DATE(YEAR(A1),MONTH(A1),1+7*3)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),8-6))
(format the formula cell to date format)


If this post helps click Yes
---------------
Jacob Skaria


"thomas donino" wrote:

> Is there a function that will return, for example, the third friday of the
> month? Or does one need to create it in vba?
> Thank you

 
Reply With Quote
 
thomas donino
Guest
Posts: n/a
 
      11th Aug 2009
Wow, great resource, thank you

"Niek Otten" wrote:

> Look here:
>
> http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear
>
> --
> Kind regards,
>
> Niek Otten
> Microsoft MVP - Excel
>
> "thomas donino" <(E-Mail Removed)> wrote in message
> news:50DBAF1F-4A90-4FA4-86DF-(E-Mail Removed)...
> > Is there a function that will return, for example, the third friday of the
> > month? Or does one need to create it in vba?
> > Thank you

>
>

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      11th Aug 2009
On Tue, 11 Aug 2009 08:14:02 -0700, thomas donino
<(E-Mail Removed)> wrote:

>Is there a function that will return, for example, the third friday of the
>month? Or does one need to create it in vba?
>Thank you


Given a date in A1 in the appropriate year and month, then:

=A1-DAY(A1)+22-WEEKDAY(A1-DAY(A1)+2)

will return the third Friday of that month
--ron
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Avg. 1-month, 3-month, 6-month & 12-month Stock Returns ryguy7272 Microsoft Access Queries 2 7th Feb 2010 03:28 PM
Print Current Month with last month and next month in Header JMoore0203 Microsoft Outlook Calendar 1 5th Dec 2007 04:15 PM
printing Little Current month and Little Next month on Banner when it should little PRIOR month and little Next month. jake_allen10@hotmail.com Microsoft Outlook 0 3rd Nov 2006 07:30 PM
change current month to prior month in header on monthly printout =?Utf-8?B?Sm9obks=?= Microsoft Outlook Calendar 0 2nd May 2006 03:13 PM
Re: Print Monthly Calendar and have Date Navigator show previous month and following month Jocelyn Fiorello [MVP - Outlook] Microsoft Outlook Calendar 0 3rd Mar 2004 06:04 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:17 PM.