#1   Report Post  
Dale
 
Posts: n/a
Default Date functions

Hi, fairly new to spreadsheets but I keep trying. Any idea how to insert
the first Friday of a month into columns? I know the (today) and (date)
functions but what if I wanted a specific day of the month. Like the first
Friday or even the last Tuesday? Thanks
Dale


  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Take a look at

http://cpearson.com/excel/DateTimeWS.htm#FirstWeekday

and

http://cpearson.com/excel/DateTimeVBA.htm#Ndow

In article ,
"Dale" wrote:

Hi, fairly new to spreadsheets but I keep trying. Any idea how to insert
the first Friday of a month into columns? I know the (today) and (date)
functions but what if I wanted a specific day of the month. Like the first
Friday or even the last Tuesday? Thanks

  #3   Report Post  
Martin P
 
Posts: n/a
Default

Start with the first day of the month in column A. Let's say you have
=date(2005,4,1) in cell A18. In cell B18 enter =weekday(A18). In cell C18
enter =6-B18.
In cell D18 enter =A18+B18, which gives you the first Friday of April 2005.

The procedure for the last Tuesday of every month is similar, but take the
last day of the month, and subtract from 3 instead of 6.

"Dale" wrote:

Hi, fairly new to spreadsheets but I keep trying. Any idea how to insert
the first Friday of a month into columns? I know the (today) and (date)
functions but what if I wanted a specific day of the month. Like the first
Friday or even the last Tuesday? Thanks
Dale



  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Sat, 09 Apr 2005 18:29:19 GMT, "Dale" wrote:

Hi, fairly new to spreadsheets but I keep trying. Any idea how to insert
the first Friday of a month into columns? I know the (today) and (date)
functions but what if I wanted a specific day of the month. Like the first
Friday or even the last Tuesday? Thanks
Dale


I'm not sure exactly what you want to set up.

The first Friday of any particular month is given by the formula:

=DATE(yr,month,8)-WEEKDAY(DATE(yr,month,9))

To compute subsequent first Fridays, assuming the above formula is in B1, use
the formula:

=B1+28+7*(MONTH(B1+28)=MONTH(B1))

If you want the 2nd, 3rd or 4th Friday, add 7,14 or 21 to the formula in B1,
and use this formula for subsequent months:

=B1+28+7*(DAY(B1-DAY(B1)+35)<WEEKDAY(B1-DAY(B1)-5))

The above are adapted from formulas by Daniel M.
--ron
  #5   Report Post  
Dale
 
Posts: n/a
Default

Thx, just what I was looking for.
Dale


"Dale" wrote in message
. uk...
Hi, fairly new to spreadsheets but I keep trying. Any idea how to insert
the first Friday of a month into columns? I know the (today) and (date)
functions but what if I wanted a specific day of the month. Like the
first Friday or even the last Tuesday? Thanks
Dale





  #6   Report Post  
Martin P
 
Posts: n/a
Default

Correction.

For my method, another column is needed:

In E18: =D18+7*(MONTH(D18)<MONTH(A18))

"Martin P" wrote:

Start with the first day of the month in column A. Let's say you have
=date(2005,4,1) in cell A18. In cell B18 enter =weekday(A18). In cell C18
enter =6-B18.
In cell D18 enter =A18+B18, which gives you the first Friday of April 2005.

The procedure for the last Tuesday of every month is similar, but take the
last day of the month, and subtract from 3 instead of 6.

"Dale" wrote:

Hi, fairly new to spreadsheets but I keep trying. Any idea how to insert
the first Friday of a month into columns? I know the (today) and (date)
functions but what if I wanted a specific day of the month. Like the first
Friday or even the last Tuesday? Thanks
Dale



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
Complex Date Functions Simon Heaven Excel Worksheet Functions 6 November 6th 09 05:11 PM
Date functions Kirk P. Excel Discussion (Misc queries) 2 April 6th 05 05:36 PM
Quick date calculation functions Grey Excel Worksheet Functions 3 March 14th 05 03:01 AM
date and time ladimples247 New Users to Excel 2 February 16th 05 08:52 PM
Date issue between Windows and Macintosh version dlg1967 Excel Discussion (Misc queries) 4 January 19th 05 03:51 PM


All times are GMT +1. The time now is 12:45 PM.

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

About Us

"It's about Microsoft Excel"