Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Last working day of a month

Hi,

I don't understand how you get 30/5/2008 from 1/4/2008 for the last day of
the month but try this

=DATE(YEAR(A1),MONTH(A1)+1,0)+1-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0)+2)

or if you have the analysis toolpak addin the simpler

=EOMONTH(A1,0)-MOD(EOMONTH(A1,0)+1,7)

Mike



"Jamal" wrote:

I am trying to write a formula to show the last working day (working days are
Monday to Friday) of a month based on the date in the previous cell. If A1 =
1/4/08, A2 should show 30/5/08 (Friday). I have tried
DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)+30). However, this picks up the day in
A1+30. What I want is the last working day of the month not the last day of
the month. I appreciate any help with this formula. Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Last working day of a month

Aplolgies for my elderly moment I gave you a formula for the last Friday of a
minth. For the last working day use

=DATE(YEAR(A1),MONTH(A1)+1,0)-(MAX(0,WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)-5))

Mike

"Mike H" wrote:

Hi,

I don't understand how you get 30/5/2008 from 1/4/2008 for the last day of
the month but try this

=DATE(YEAR(A1),MONTH(A1)+1,0)+1-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0)+2)

or if you have the analysis toolpak addin the simpler

=EOMONTH(A1,0)-MOD(EOMONTH(A1,0)+1,7)

Mike



"Jamal" wrote:

I am trying to write a formula to show the last working day (working days are
Monday to Friday) of a month based on the date in the previous cell. If A1 =
1/4/08, A2 should show 30/5/08 (Friday). I have tried
DATE(YEAR(A1),MONTH(A1)+1,DAY(A1)+30). However, this picks up the day in
A1+30. What I want is the last working day of the month not the last day of
the month. I appreciate any help with this formula. Thanks in advance.

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
Working out a value within a certain month. Matt Excel Worksheet Functions 14 November 13th 08 03:52 PM
First working day of the month Hedgie Excel Worksheet Functions 2 January 8th 08 03:35 PM
Last working day of month JudithJubilee New Users to Excel 5 June 6th 07 02:25 AM
=month formula no working PG Excel Discussion (Misc queries) 4 January 23rd 07 08:01 PM
Last Working Day In Month Winston New Users to Excel 9 November 3rd 05 04:49 PM


All times are GMT +1. The time now is 05:11 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"